Docker create (rebase of 6907)

Closes #6907

Ping @vieux @unclejack @crosbymichael
What the point of creating cidfile before creating container? Actually I don't understand why we need so complicated datastructure as `cidFile` for this task.