Fix the target URL of HTMLForm

- Use a local URL instead of a full one
- Use $wgScriptPath instead of title's URL when $wgArticlePath
  contains a "?" since it'll be removed by web browser
- Move the URL generation to getAction() for better readability
- Use getMethod() instead of mMethod for consistency

Change-Id: I7c40cae839e52e2e8618d48c7a3b2f9709e6f2d6
Merge "Fix the target URL of HTMLForm"