Adding Blackberry platform detection
Fix error when creating a Response with status "foo bar"

Say your app does `return Response("baz", status="foo bar").

In wrappers.py, when the status property is set, if it can't be parsed
to an int (line 753), the status code is set to 0. However, in
serving.py lines 115, 116, we try to parse it again to an int which
fails. (again)

This fixes it by changing the status code to 0 as before and then the
status to "0 %s" % status. (-> "0 foo bar")
This can then be parsed properly in serving.py. (though admittedly, the
question is open to know if it should continue at all if Response() is
called with such a status in the first place...)

Signed-off-by: Timothée Boucher <timothee@gmail.com>
Fix error when creating a Response with e.g. "404"

If you call Response() with a status of "404" as a string
(`Response('foo', status="404")`) without the reason as part of the
string, the setting of the message `msg` will fail because
`status.split(None, 1)` will have only one value and can't be unpacked
to code and msg.

In wrappers.py, the status can be parsed to an int (line 753),
so status is set to (string) "404" and status_code is set to (int) 404.

RFC 2616 allows for an empty reason message to be sent. Without this fix,
you can't actually sent an empty message and you'll get an error if
you're trying to build a Response object based on the response from
a third-party server that could send an empty reason message.
(though probably rare, it happened to me, which is how I came across the
problem)

Signed-off-by: Timothée Boucher <timothee@gmail.com>
fix enough code we get to import the actual testsuite from the runner
have the test module finder raise the original ImportError
use io.BytesIO instead of cStringIO in formparser
introduce werkzeug._compat starting with urlparse
xrange->range
various six based import/syntax fixes
use new style octal literals
a mass of byte string and import fixes
some more name/syntax fixes
string type, integer type and stringio replacements - now the suite runs
posargs for tox
naively encode fs cache keys if they arent byte strings
some naive string type fixes in werkzeug/test
some naive changes to uri/iri handling
kill a spurrious xrange from tests
switch datastructures to direct imports from six
fix a ordered multidict testcase