If comment context is requested for a git submodule file, an exception
is thrown in CommentContextLoader because the object type is not a blob.
This change fixes this case. Since this check was also done by the Get
Diff endpoint, I extracted the logic in a common class that can be
reused by both classes.
I also added a test for this case in CommentContextIT. The logic for the
private methods (creating a project, pushing a change) is copied from
SubmoduleSubscriptionIT. This is better than subclassing
SubmoduleSubscriptionIT since the shared logic between the two classes
is very small.
Change-Id: Ibbfa00212386322d70289ed8077d84357083e0c8