browser.py: rewrite _request method
browser.py: rewrite _request method

Fixes #158.

Improve consistency of query string construction between
MechanicalSoup and web browsers in edge cases where form elements
have duplicate *name*-attributes.

For example, if a form with the following is submitted:

<input name="key" value="val1" />
<input name="key" value="val2" />

Then the resulting query string will now be

key=val1&key=val2

instead of

key=val2

More detail
===========

Store data to be encoded in the query string in a list of 2-tuples
instead of a dictionary. In doing so, we allow for the possibility
of multiple form elements being submitted with the same name.

Surprisingly, this is legal HTML (though sometimes unintentional),
so we want to be as faithful as possible to how the query string for
such a form would be created in a real browser.

To do this, we need to process the form elements in the order that
they appear on the page, rather than grouping them by type (which
is what we were doing when we stored the data in a dict).

This change allows us to accept any (name,value) combinations at
any point in the page without worrying about handling name conflicts
or whether to store a single value or a list of values -- because
now every bit of data is simply appended to the list of 2-tuples.

Ultimately, this means that the method is now agnostic to the
validity of the form data. While the `Form` class will still prevent
most illegal form manipulations, it has no control over HTML that
is malformed when it is served. There are some fringe cases where
malformed form HTML would cause MechanicalSoup to throw, but will
now submit the data as-is just like a browser would.

Note: We have simplified some of the logic by changing the bs4
selector to restrict to tags with name-attributes for all tag-types
(previously it only made this restriction for `input` and `button`,
even though it still ignored name-less `textarea` and `select`).

hemberger/MechanicalSoup,hickford/MechanicalSoup,MechanicalSoup/MechanicalSoup