sort keys in the _rearrange_params method

and favour certain keys other others when a param can have several
options. for example:

	[ 'BAR','FOO','BAZ' ]

will be sorted alphabetically, but should we want to 'FOO' to always
be favoured over any other option if it is provided then we need to
add it to the regexp in the sort of the keys so when a user passes
in:

	-foo => 1
	-baz => 2
	-bar => 3

then -foo will be taken as the canonical option, but if -foo is not
passed in then we sort the options alphabetically meaning the -bar
option would be taken

this is relevant for the [ 'TYPE','CONTENT_TYPE','CONTENT-TYPE' ]
set of params as passing through both -type and -content-type and
additionally -charset leads to hash key ordering bugs meaning the
Content-Type output in header is inconsistent. ref: GH #155