Sort maven dependencies in generated pom files

Previously the maven dependencies were specified in an arbitrary order
which made comparing the poms against other versions difficult.

This commit sorts the dependencies by scope, group id, and then
artifact id.