Extend form helpers plus tests

Adds a new method `form2FormData` that returns a FormData object with all the inputs of a form added to it. This makes it easy to submit via AJAX, and will also properly handle file inputs (unlike form2JSON).

I added tests to cover the form helpers as well.

@sebmartin @pseudomuto @lemonmade