Merge pull request #4 from neykov/osgi

Wait for OSGi framework to stop before trying to delete its cache.
add BrooklynClassLoadingContext and pass it around when we are instantiating,
fixing BrooklynComponentTemplateResolver.loadEntitySpec to use new loaders from CatalogItem.

currently BCLC does not really pull his weight, as he is just used for instantiation and is never combined or kept;
but as we fix deeper bugs in trying to resolve classes from the purview of another,
i think it will become very useful.

(already it should be the case -- but needs testing -- that BCLC allows children to be resolved WRT
the parent's bundle if they are not declared as catalog items)
fix NPE
Test adding an YAML OSGi backed item to the catalog and launching it using YAML.
Add test - get entity definition from OSGi based YAML.
temporary fix for yaml/java-type resolution, and notes on the better solution
Merge remote-tracking branch 'neykov/osgi-test' into osgi
make constant string public for use in other tests
Fixing catalog listing/instantating from REST via yaml
On catalog.addItem, ensure cache is updated
Handle catalog item referencing other catalog item
remove old brooklyn-tests jar
Add project for generating a test OSGi bundle.

The project is included as a resource, not part of the normal build cycle.
fix CampYamlLiteTest with Sam's suggestion to use a classpath url which we know will be valid
fix NPE in BrooklynYamlTypeInstantiatorTest (supertype is null)
fix CatalogResourceTest failure where 1) bundle was not resolved and 2) the default classloader was not used
specify fixed (snapshot) version of osgi bundle, add an icon, and a readme saying where they come from
switch ResourceUtils so it can use BrooklynClassLoadingContext, and extend BCLC so it can support getResource, and use a ResourceUtils with item-specific BCLC when resolving icons, with test in CatalogResourceTest).
(this is just one place of many that i expect we will have to do some tweaking to ResourceUtils, but it confirms/shows how it can be done elsewhere)
more tests and TODOs of tests we need
Support for referencing Java catalog entities in YAML