Improve ready/network state handling in media player

This change put the pipeline in the correct state after buffering,
making possible to query the duration right after load.

Reviewed by: Tullio Lucena