Atomistic mechanisms of adhesion and compression of diamond surfaces