"0install add" prefers ~/bin to any other paths in $PATH

Otherwise, if other programs have added local directories to $PATH then
we might install there thinking that's the user's preferred bin
directory.
Compile with safe-string

Everything of "string" type is now immutable.
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.