IDL compiler: [TreatNullAs]

Not doing [TreatUndefinedAs] yet b/c not used for attributes.
Also some refactoring of duplicated is_enum/is_callback_function.

Docs:
https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extended-attributes#TOC-TreatNullAs-a-p-TreatUndefinedAs-a-p-

BUG=239771
NOTRY=true

Review URL: https://codereview.chromium.org/32073004

git-svn-id: svn://svn.chromium.org/blink/trunk@160133 bbb929c8-8fbe-4397-9dbb-9b2b20218538