Implement atom, compare-and-setresetswap! and deref for atoms

MutableEntity is clever, but I couldn't think of a way to make it work without writing a java class.
The atom specific functions were pulled out into IAtom, which is covered by this pull request. Following this, IRef will need implemented, which will force the addition of metadata to atom and allow ref to be easily implemented.