Added abstract solver MODEL type

The idea here is that instead of giving the solver access to everything
(XML, attributes, bindings, etc), it uses a more limited interface with
just the bits it needs. This should make the solver easier to
understand.
Removed is_dep_needed from Solver_core

Just don't pass in unnecessary ones.
Formatting
Moved result object to Solver
Moved some helpers out of the Solver_core functor
Interface for Solver_core
Split core requirements into its own type
Moved remaining XML code out of Solver_core
Replaced (iface, source) pairs in solver with more general Model.Role.t

This removes all the places where Solver_core made assumptions about
"source" (e.g. that a dependency is always on a binary).

This limitation is now pushed back to Solver.Model.
Made command_name abstract
Solver documentation
Solver_core returns a RoleMap rather than a list
Moved get_selected out of Solver_core

Not needed now that we return a map.
Simplified Solver_core return type
Documentation
Code tidying
Moved machine strings out of Solver_core
Return dependency information as a record

Makes it easier to add synthetic dependencies.
Bugfix: follow self-commands in decider

When directing the search towards the optimal selection, we ignored
self-bindings and therefore didn't bother to optimise the selection
of dependencies of commands used in this way.
Split Justify module out from Diagnostics