Fix missed history writes
Fix missed history writes

Links were opened before AJAX calls finished.

* Navigation now happens after calls complete.
* History is now refreshed only on page load since its not visible after
  link navigation anymore (now that they're not forced into new
  windows).

codeactual/foxtrap,codeactual/foxtrap,codeactual/foxtrap