Console error messages as requested by hatch on _addIconsToUnits
* Both the case where no service is found and the case where the service has no icon are logged.
* Tests added.
Fix unit mapping to machines.
Merge pull request #315 from jaycee/nice-big-blowup

* This addresses a request from hatch that the _addIconsToUnits method log an
  error under certain failure modes that would otherwise be silent.
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..."`.