Parse key value pairs sent in POST body (#4627)

Backported from the master branch.

Conflicts:
	msautotest
fixups to build/test scripts
Merge branch 'branch-6-2'

Conflicts:
	msautotest