Merge pull request #19 from FreekDB/master

Fixed even more Checkstyle issues and other small changes
Addressed following TODO (Thanks to Freek for the tip): 
//TODO: can we use Collections.sort with a custom comparator here? 
ReportUnit.java now implements Comparable<ReportUnit> interface.
Added a comparator in ReportUnit.java to compare report units.
Removed compareTo(thisUnit, otherUnit) method from ReportUnit.java. 
ViewerFrame.java now uses Collections.sort() method to sort reports.
Removed extra comments from ReportUnit.java.
Addressed following TODO from JsonMetricsReader.java:
TODO: can we read the available metrics from the json file instead of
using allMetricsMap? [Freek]
[Pravin] Made a comment next to this TODO.
Removed unnecessary import from ReportUnit.java.
Addressed following TODOs:
//TODO: maybe it's better to put the responsibility for writing
properties in a separate Settings class? [Freek]  
//TODO: looks like updating the GUI is done elsewhere. If that's the
case, we can rename this method. [Freek]  

Created new class utils.PropertyFileWriter to delegate writing
properties to the property file.
MetricsParser.java:
Moved updateMetricsToDisplay(...) method to PropertyFileWriter.java
Renamed updateMetricsToDisplay(...) method to
updateMetricsSelection(...)
DataEntryForm.java now uses PropertyFileWriter to save dates selection
and root folder selection. 
ChoosemetricsForm.java now uses PropertyFileWriter to save metrics
selected by the user.
Committing newly added class PropertyFileWriter.java.
ViewerFrame:
- Looked into the Checkstyle MagicNumberCheck: it currently only allows the multiplication operator to be used in constant expressions (& also unary plus and minus).
  Workaround for the moment is to use CHECKSTYLE_OFF/ON markers for the MagicNumberCheck in applicable places.
  See the ALLOWED_PATH_TOKENTYPES array in the MagicNumberCheck class:
  http://checkstyle.hg.sourceforge.net/hgweb/checkstyle/checkstyle/file/a485366ec8c3/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java
- Split up the getControlFrame method into smaller parts by creating the createControlPanel, createZoomPanel, createZoomButtonsPanel, createZoomXAxisPanel and fillZoomXAxisPanel methods.
- Created the VIEWER_WIDTH and SPLIT_PANE_1_WIDTH constants for GUI dimensions.
- Removed the null checks for the orderedReportUnits and desktopPane fields because these always refers to an actual object, making the checks unnecessary.
- In the sortChartFrameList method, all deselected reports are collected while adding the selected reports, making it easier to add them after the for loop is finished.