Fix single machine view stuff.

- Add a missing semicolon and set pendingCreation to false on machine creation failure
- Properly update machine_manage_keys dialog for new key, when new machine is created
- Set pendingCreation to false on machine destruction
- Fix ajax loader positioning in various resolutions
- Rewrite code using less lines