This method can be used to detach the specified object from the specified menubar.
After this method returns the specified object will change its state from attached
to detached. This means that you could now attach it to another menubar using a
function like Menubar.Insert or you could free it using moai.FreeObject().