Improve error message for duplicate rules and unknown pools.

Also add more tests for invalid manifests. According to gcov, these invalid
inputs weren't tested before.
Merge pull request #611 from nico/testparse

Improve error message for duplicate rules and unknown pools.