Fixed an obvious bug in createNewFormVersion and added a unit test for it.
Added a ultility method for finding the current formVersion on the formDefinition.