Modify `$.param()` to more closely match jQuery

For arrays containing scalars, query does not include the final array index

References 15dcdf9f2e4d987e61b1bcc86cb3087ebbb7057c
Closes #749, closes #850