unpack_trees: move submodule specific code into verify_clean_submodule()

Currently verify_clean_subdirectory() will call resolve_gitlink_ref() and
do the hashcmp() between the submodule's HEAD and the commit recorded in
the superproject just before calling verify_clean_submodule() afterwards.

But these are both submodule related operations, so lets move them into
the verify_clean_submodule() function. Even though this patch changes the
behavior in case resolve_gitlink_ref() fails, this can be considered a fix
as in the old code in case of a failure of that function the execution of
verify_clean_subdirectory() would have continued, which makes no sense for
submodules. And while at it also add special errormessages for modified
submodules.

Thanks-to: Jeff King <peff@peff.net>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>