Editor: improve handling of entities with invalid coordinates.

Maps containing entities not aligned to the grid can now be loaded.
When trying saving them, the error message is now more explicit.
Also, dragging an entity automatically fixes its coordinates if it was
not aligned to the grid.