Fix rebinding to entities/policies living in OSGi bundles

When an entity/policy is created from a catalog item we make a note of its related catalog item id. On rebind we use that information to get the class loading context from the corresponding catalog item so that classes from OSGi bundles referenced in the item config are accessible.
Look in parent entities when looking for a context catalog id to load classes from.
Use explicit property for context catalog id bookkeeping

Move from using tags to set the context catalog id to explicit properties.
Make a note of the remaining steps needed for reliable rebind + OSGi bundles.
Set the catalog item id used when creating BOSpecs
Fix compile warnings
Initialize the context catalog item id when adding items to the BO hierarchy.
Initialize the context catalog item id from the current task's context entity.
Merge remote-tracking branch 'apache-gh/pr/274' into misc4

Conflicts:
	utils/common/src/main/java/brooklyn/util/text/Strings.java - unambiguous new methods added at end
Catalog Item ID field renaming and ApiObjectsFactory tweaks

* catalogItemId rather than contextCatalogItemId
* ApiObjectsFactory moved to internal package, inner class promoted so services file is nicer
* safer initialization of ApiObjectsFactory
minor tweaks to catalog item id setting

move catalog-item inferencing based on entity proximity to a helper method with a bit of logging
(did this mainly because i didn't see it in addChild/addEnricher/etc but then i realized you'd
done it in setParent/setEntity ... now it's in both which is superfluous but harmless)

only change of note is putting {get,set}CatalogItemId in the EntityTransientCopyInternal so that
on hot-standby rebind we are allowed to set these. (not sure if that was a problem or not.)

next will test this, but need to grab some osgi items to do that!
tidy up osgi test bundles, in prep for writing more bundles and more tests
OSGi catalog item test (see full msg for details)

Add some more OSGi test bundles - see OsgiTestResources.
Write lots more tests of OSGi loading and item ID - in OsgiEntitiesTest, and in camp project using YAML e.g. Catalog*Osgi*Test.java .
Also load OSGi on addItem(CatalogItem), and improve OSGi loading error messages when OSGi loading fails.
Better error messages on OSGi failures.
Merge branch 'master' into misc6
mark some policy tests as integration, lower the invocation count for one quite slow one
code review, and fixing failing test and rat checks
Changes missed when fixing Riak hostname and URL
This closes #294
This closes #296
tweak blueprint, should use metric not binary suffixes (binary 100g doesn't match in some clouds, eg softlayer)