Sort gems into groups

So that we can avoid installing development and test gems
in production.