Serialise terminated instances

In order to retrieve information post-mortem (done, failed, lost) for an instance we need to store it as the original data is lost with the removal of the instance directory. This change-set serialises the instance state into JSON as the value for the already existing keys in the procs subpath. Together with that it implements a method to retrieve the state and turn it into an `Instance` again.

***
/cc @bernerdschaefer @grobie @peterbourgon