Fix Rubocop lints in PropertySortOrder

Extract some helper functions from the complex `compare_properties`
method.

Also fix the multi-line method chain lint.

Change-Id: I0b01db044e362a39063b052eb9cb49e19467ef13
Reviewed-on: http://gerrit.causes.com/36716
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>