util: Add GDirectory.markTouched.

Also make getAllDirectories and getUsedDirectories public since
they can be handy for custom prune logic.
migrations: Add Config.pruneSourceDirectory.

This makes switching branches easier as we assume it's fine to delete
old domain/query/builder classes when applying migrations on the
changed branch.

The developer can always recover the source from `git diff` if it's
still needed (e.g. renaming an entity).
Merge branch 'master' into stable

* master:
  migrations: Add Config.pruneSourceDirectory.
  util: Add GDirectory.markTouched.