Fix build on the modern OS X where Java is not provided in the same way
Fix code style
Fix an issue where the dueDate calculations of a milestoneGroup could crash the edit milestone page.
We needed to merge the object into the new session earlier in the lifecycle if dueDate is being set.