Properly handle mutex creation failures

Ignore-this: 443cf497ecf723c7bcfa35356eb338bd

Previously they were ignored, so everything went fine until the
lock was acquired, which would fail with EINVAL. Fail early.

darcs-hash:20130911095312-56b4d-e4807dbbbc12b92fd67a65e10b10b6a0a79b0348
Renamed MediaStreamRegistrar to MediaStreamType

Ignore-this: 9fa3c2c4a84e1a029a870ebb7408bb28

darcs-hash:20130913154246-b22ec-0febdc0d104211bff85dc11656cc217d6d7955ec
Fixed indentation

Ignore-this: a7edbcb46bb1f9b59622b99766254a91

darcs-hash:20130916131659-b22ec-0aa20da29f102619509c28cbd7320c31de9c888a