Fix broken ability to remove resources from the catalog.
For the last forever, the Puppet catalog object has unable to remove resources
correctly - they used the wrong key to remove items from an internal map.
Because the test was broken we also ran into a situation where this simply
wasn't noticed - and, presumably, we simply didn't depend on this in the real
world enough to actually discover the failure.
This fixes that, as well as the bad test, to ensure that the feature works
correctly, and that it stays that way.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>