Fix Document.getElementsByTagName to return the root node.

I introduced this regression when changing Element.getElementsByTagName
to not return itself. Note that one of our tests (GetElementsByTagNameNS)
had the wrong expectation here; the new result is consistent with the RI.

Also fix a related problem in InnerNodeImpl which assumes the document
field is always non-null. It can be null for Doctype nodes!

Change-Id: I40b5bb52b8396cd282cd5465029a9f0c4040de0c
tree: ebd917e897c020792b4ed229a2754f5d542f1707
  1. src/
  2. Android.mk
  3. MODULE_LICENSE_BSD_LIKE
  4. VERSION