[cmake,bugfix] Allow usage of empty CMAKE_MODULE_PATH.

At least for dune-common the CMAKE_MODULE_PATH may be empty
and removing an item from an empty list is an error. This
patch fixes this issue by checking whether th list is empty.
(cherry picked from commit dd2a9b4269edd32c83c0878d81df01108ce607b2)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>