Remove unused code to support preffed-off and chrome-only APIs.
auto merge of #2657 : Ms2ger/servo/geckoisms, r=jdm
Handle JSAPI OOM failures by task failure as soon as possible.

We already ensure to fail the task if GetProtoObject returns null, as we don't
have a useful way to handle OOM, and we don't wish to thread the failure
through to some place where we could handle it in a useful way.

Unfortunately, we cannot ensure through the type system that none of those
functions returns null, so we use assertions to check it dynamically.