Implement firstChild and lastChild for Document nodes