BUG Fixes to link rewriting when previewing subsites.

* JS error with href-less links
* All forms get injected hidden fields, even though the loop attempts to
check for only the ones that submit locally.
* Also check for action-less forms.