Fix link code.

Add code so jumps from link_target work.
Add code so jumps from link_reference to sections work.
Added code to edit xxx_ references that point to xxx.html
by converting xxx.html links to xxx.rst before editing.