contrib/checkpatch: recognize git subtree merges
Make checkpatch.pl identify subtree merges in "git am"-formatted patches and reconstruct the full path names based in the subtree root.
This fixes some spurious warnings for parts of the tree that use different coding style from what we usually do.