Added EntityAspect.setDetached, + fixes to Detach/EntityState/HasChanges bugs.