[test] Added a test for the thrown parser error.

See fe1619d5e5496cd74934bcdfdfa9917085752c0d for the fix
[fix] Reset the configuration when we are loading a new configuration

If we don't reset the configuration we introducing duplicate keys as the `Haproxy.config` getter is also doing a `read()` so if you are reading 2 documents, you are actually merging them.