xpcom_abi:get return values with NS_ERROR_GET_CODE

Since Gecko 19, the type "nsresult" is not an integer, but an enum class.
This causes compiler errors when returning the nsresult from a function.

By wrapping nsresult in the NS_ERROR_GET_CODE() macro, we can retrieve the numerical value of the error code.
Since Debian testing still has 10.0 (without mozglue) we need to conditionally compile for it.