Refactor Ubuntu related classes

Move Ubuntu 12.04 code into dedicated package.

This is in preparation for different code for Ubuntu 14.04,
which is not part of this commit.