asynctypes-685526: Tidy-up while sync with Firefox

Updates while syncing code with firefox. Includes:
- Be more conservative about checking options in helpers
- Be consistent about using message rather than error in helpers
- Remove some commented out code
- Update firefox test wrapper code