Bug 883078 - Null-check documentElement when removing browser handlers. r=gavin