Change to use arbitrary depth search for endnotes

Instead of an absolute depth (which should have been predictable but, at present, is not due to list parsing bugs) I have switched the endnote parser to using //note as its search criterion.

This allows us to pick up the endnotes at any depth and enables correct ordering.