Sync with the current 0.4 version of the specification

spec.txt updated, tests regenerated. all tests pass without any
modifications to the code.