[dunecontrol] Add support for Git submodules

Some Dune users like to aggregate all the Dune modules required for a project by
creating a Git repository with a Git submodule for every submodule. Unfortunately,
dunecontrol currently doesn't recognize the submodule repositories currently because
Git aggregates all repositories in the .git directory of the superproject (more
preciselyin in the subdirectory .git/modules/). In the submodule, .git is a regular
file that contains a referral to the actual repository directory.

This patch fixes the problem by

- Detecting Git directories by looking for both directories and regular files called
  .git in the module directory.

- Following the referral in submodules for the hook setup to make sure the hook gets
  installed in the correct location.

Fixes FS#1303.
[dunecontrol] Improve path quoting in vcsetup command

Make sure to always quote paths that are relative to PREFIX_DIR, as that variable
may contain spaces.
[Whitespace] Clean up trailing whitespace in dunecontrol