Machine and Container tokens can now be marked as uncommitted.

This branch adds the ability to mark and unmark machine and container tokens as uncommitted.

I did a bit of style refactoring to remove the duplication between the two tokens.

This is not currently hooked up to anything, but is there for when we introduce the uncommitted state of these tokens.