Make mMediaParent an nsRefPtr.

Review suggestion from bz. Simplifies the calling code.
Add an UnbindFromTree() which nulls mMediaParent.