XWIKI-8649: Error when changing the number type of a field from an application
* Some cleanup before the actual fix:
** Use @Inject instead of Utils.getComponent()
** Move tests to Mockito.
** Rewrite XWikiHibernateStoreLocksTest inside XWikiHibernateStoreTest
** Create a base class for Hibernate store tests.
XWIKI-8649: Error when changing the number type of a field from an application
* Fix NPE when the value of a number property is not set.
* Refactor variable names.