Fix #464: Separate test succeed state for different stages

Note that with this change, the `testListeners` key is scoped in the
stage and not the test tasks themselves for staged tests. The global
`testListeners` setting is still honored.

The same applies to the `testFilter` key for the staged `testQuick`
tasks. E.g. `fastOptStage::testQuick` depends on
`fastOptStage::testFilter` rather than `testQuick::testFilter`.
Merge pull request #605 from gzm0/testQuick-state

Fix #464: Separate test succeed state for different stages
Add missing newline in dummy packfile
Fix #603: Generate DummyParents.js in packager

Note that with this change, a given dummy parent might be created
twice, due to the separate packaging of internal dependencies,
external dependencies and the project code. We make a runtime check to
ensure we don't override anything.
Merge pull request #606 from gzm0/fix-dummy-pack-file

Add missing newline in dummy packfile
Test with PhantomJS. Closes #593
Merge pull request #607 from gzm0/generate-dummy-parents

Fix #603: Generate DummyParents.js in packager
Merge pull request #611 from gzm0/test-phantomjs

Test with PhantomJS. Closes #593
Fix #599: Make anonymous function optimization fail rather than crash
Merge pull request #615 from gzm0/safe-try-gen-anon

Fix #599: Make anonymous function optimization fail rather than crash
Fix #614: Remove return-type restriction on exported functions
Fix #613: Reject bad value class arguments in exporters
Merge pull request #616 from gzm0/fix-exports

Fix exports
Fix broken Phantom.js test definition
Fix #595: Test SBT plugin in published form on Travis
Merge pull request #618 from gzm0/plugin-test

Plugin test
wip