Move the code for parsing Xr macros to a different function.

This is not complete, need to use an array or list to capture all the .Xr's in the document and store
them in the db at the end of parsing.