Fixes issue 792 by adding guards to detatch, also throws IllegalStateException if we ever try to attach when not attached, or detach when not detached. Review by: jgw git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@946 8db76d5a-ed1c-0410-87a9-c151d255dfc7