GUI: fixed implementation of editing entity details

- Use native object cloning before setting new parameters
  to entity. Passing original object to update callbacks
  caused local update even when finished in error state.

- When entity update is successfull, call also open() on tab,
  since name of entity can be show in menu and wouldn't be
  updated until next menu refresh.

- Fixed equals() and isPrepared() on edit entity tabs.
- Source format, removed unused code.