refactor commit

This PR optimizes commit for btrfs so that Docker is using btrfs snapshotting.

This speeds up the final commit during `make build` from 1.6s to 0.007s on a system. It also removes the need to read and write any data during commit if we're using btrfs.