Fix import order

Imports were somewhat unordered. Now imports are almost always
sorted into three groups (scala/java packages, third party packages and
first party packages) with fully qualified package names.