Allow optional enforcement of newtype filters

This changes the parser monad to return a list of errors/warnings even when the parse is successful. At the moment errors and warnings use the same representation, for convenience. Client libraries are not really expected to look at the details of errors/warnings, just pretty-print them.