Fix ES6 export parsing

It deviated from the current [ES6 draft spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports) in a few ways:

`export default class A {};` - the class in question is a class expression
`export default function () {}` - this is not allowed
`export {};` and `export {} from "foo";` - these should be allowed

Also it was kind of weird how esprima was setting the specifiers field on `export default function foo() {}` to include `"foo"`. Now the specifiers are exclusively whatever is in the `{...}` ExportClause of the export.
Probably a good idea.

In test/harmonymodulestest.js:

> @@ -56,40 +56,6 @@ var modulesTestFixture = {
>                  end: { line: 1, column: 18 }
>              }
>          },
> -        'export default function () {}': {

Ok, coincidentally, other people were pounding on this issue and Allen just
replied here:
https://esdiscuss.org/topic/es6-spec-export-default-hoistabledeclaration#content-1

We just need to open the bug for the spec, and potentially update esprima
to reflect that with some better semantics of the AST, but that part I'm
not sure yet. I think this was influenced by the transpilation process
today, where:

export default function () {}
// de-sugaring to a function expression
bindingDefaultEntry = function () {}

while

export default function foo () {}
// de-sugaring to a function declaration
function foo () {}
bindingDefaultEntry = foo;

but I knowledge that this is far from what the specs are trying to project.

—
Reply to this email directly or view it on GitHub
<https://github.com/facebook/esprima/pull/72/files#r20595893>.