Deleting a layer, we need to delete all of its associations to maps containing it. It fixes #597.
Merge pull request #598 from capooti/issue-597

Deleting a layer, we need to delete all of its associations to maps