client: manage media in session as a last step

Once we manage a media in a session, we can't unmanage it anymore
without destroying it. Therefore, first check everything before we
manage the media, otherwise if something is wrong we have no way to
unmanage the media.
If we created a new session and something went wrong, remove the session
again. Fixes a leak in the unit test.
client: keep ref to client for the session removed handler

This extra ref will be dropped when all client sessions have been
removed. A session is removed when a client sends teardown, closes its
endpoint of the TCP connection or the sessions expires.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732226
server tests: send teardown to cleanup session
client tests: send teardown to cleanup session
client: check if watch is set in handle_teardown()

The unit tests run without a watch