Test submodules with empty index or orphaned head

In both of these cases, the submodule data should still be loaded
just (obviously) without the data that comes from either the index
or the HEAD.

This fixes a bug in the orphaned head case.
Merge pull request #1688 from arrbee/submodule-load-ignore-orphaned-head

Test submodules with empty index or orphaned head