Don't include the same change twice in GetRelated.

If the order of commits was modified, while keeping the same change
number, GetRelated would return both the new patch set and the old patch
set. Instead of walking the children first, walk the parents first and
exclude the changes from which the parents came. The changes are still
used for generating the children queue, since there could be new
children on top of the excluded ones.

+ Add test for listing related revisions.

Change-Id: I297aef2cd966c3ea38501fc3d560d6776f58c09f
Bind content type text/x-h to text/x-c++hdr

*.h is commonly used for C and C++ sources.  The server's MIME type
recognizer frequently returns text/x-h for *.h files, which CM3's
clike mode does not understand. Remap to the c++hdr type just in case
its a C++ source file and a C file.

Change-Id: I37454147759bbfbcb268690dd8f00ad6bf4a8b32
Merge "Bind content type text/x-h to text/x-c++hdr" into stable-2.8