Extract an UnresolvedBlueprint interface

UnresolvedBlueprint contains data which is available without resolving all
the required types of that blueprint.
Fix tests after refactor, add tests for untested code
Fix generics issue preventing command-line compilation with maven's compiler
Fix ArithmeticException when the profit percentage does not have an exact representation
Include the id when sorting AbstractTypes

Since we put them in a SortedMap, compareTo is used for equality, so ensure
that only AbstractTypes which really represent the same database type compare
as equals.