Refactored SingletonBeanFactory into an interface/impl so that it can
be exposed over OSGi. Added pojosr sync property to more tests.