Improved cross-reference resolution.
Improved cross-reference resolution.

Use foldr instead of foldl.

This avoids the hang that occured with circular cross-references
(closes #190).

jkr/pandoc-citeproc,jgm/pandoc-citeproc,adunning/pandoc-citeproc