Strip strings before converting to integers

We've been seeing that some browsers sends trailing whitespace after the the value of the Content-Length header, which causes the request handler to crash. This changes the b2i and l2i macros to strip the strings before converting them.