Fix unit mapping to machines.
Merge pull request #319 from huwshimi/machine-unit-matching

Unit mapping to machines was broken because it was doing partial id matches on the position of the match e.g. if the machine id was "1" it would match "14/lxc/0" or if it was "2" it would match "26/lxc/0".

QA:

Deploy some services and let the simulator run. Once the number of machines is over 9 the additional units created by the simulator were being mapped to the machine with id "1". This should no longer happen.

After the simulator has been running for some time, in a console run `app.db.units.filterByMachine("1", true)` and all the units returned should have `.machine: "1..."`.