Inline WeakReference get method
Inline WeakReference get method

The `get` method from the `WeakReference` class uses the
`Option.apply` method to avoid null references.
This was allocating a "Some" object which is immediately read,
and then no longer needed.

This commit inlines the code from `WeakReference`, and avoids
creating that Some object.

scala/scala,lrytz/scala,martijnhoekstra/scala,scala/scala,scala/scala,martijnhoekstra/scala,scala/scala,martijnhoekstra/scala,lrytz/scala,scala/scala,martijnhoekstra/scala,lrytz/scala,scala/scala,lrytz/scala,lrytz/scala,martijnhoekstra/scala,lrytz/scala,martijnhoekstra/scala