Attempt to clean up the hard disk image creation process to better handle the existence of the two formats (hd512 and hd1024).
Adding infrastructure for partition table support. Backward compatible. Not ready for end user usage yet. Bumped version to 3.1.1 to demarcate this change.