Make StatelessEncoder merge indexed parameters before jsessionid

After fix to #223 StatelessEncoder merges indexed parameters into url, but if there is a jsessionid appended to the url then the parameters go after it. These are changes I made as a workaround.
Revisited quickstart to show the problem: http://www.ahr.com.pl/statelesslink-issue.tgz After you disable cookies and visit stateful page the links won't work.