Fix bug with using enums as default values in mojom. We were previously
generating invalid JavaScript bindings. We now translate an enum value like
FOO_VALUE in a mojom file to proper_namespace.EnumName.FOO_VALUE in JS.

I also fixed enum declarations in JS so an enum value can be defined in terms
of itself, e.g.
  enum Foo { FOO_1, FOO_2 = FOO_1 * 2 };

BUG=320082
R=darin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251417 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 251417