service: helper function for sorting services

Created a helper function to sort service list, to shorten the code
slightly and to ensure null pointer check is always done before using
the list pointer.

[connman] service: helper function for sorting services
Merge pull request #64 from hmallat/service-list-sorting-fix

service: helper function for sorting services
Merge pull request #65 from lpotter/autoconnect

[connman] allow autoconnect when service is in failure state.
Merge pull request #5 from mer-packages/master

merge upstream to fork