Serializes an HTML form's inputs into a JS object