Fix for NMS-6231 and NMS-6232

ChooseResourceController has been modified in order to fix the
parameters (parentResourceType and parentResource) if the provided
parameters are not in the correct format for the current value of
storeByForeignSource.

storeByForeignSource=false, expects something like this:
parentResourceType=node
parentResource=XX (XX ~ node's ID)

storeByForeignSource=True, expects something like this:
parentResourceType=nodeSource
parentResource=XX:YY (XX ~ foreignSource, YY ~ foreignId)

It doesn't matter if you provide or not the correct parameters,
ChooseResourceController will fix them for you if necessary.
Fixing a typo error on CollectionResourceWrapper log messages.

Also, adding a JUnit test to verify that we can use any numeric metric as
a resource-filter field.
Merge remote-tracking branch 'origin/1.12'

Conflicts:
	opennms-services/src/main/java/org/opennms/netmgt/threshd/CollectionResourceWrapper.java