Dockerfile transactions

I've implemented "transactions" in Dockerfiles, where instructions inside a transaction are all executed inside the same intermediate container. This makes all the instructions part of a single layer inside the final image. It closes #332 and #2439 

In the image history, a transaction is given the fictional command of /bin/sh -c #(transaction) <name>, similar to the #(nop) used for other instructions.

Currently only RUN instructions are supported inside a transaction, because allowing other instructions make caching far more difficult to implement for transactions.