Use the try macro in unwrap_jsmanaged.
Remove the proto_{id,depth} arguments from unwrap_jsmanaged.

Instead, we infer them from the type we're unwrapping into. This will prevent
any mismatches between the type we return and the type we check for.
Use unwrap() when finalizing.

This allows us to duplicate a little less code.
Move unwrap_jsmanaged and related machinery to conversions.rs.
auto merge of #4449 : Ms2ger/servo/unwrap_jsmanaged, r=jdm