Handle missing HTTP method and version gracefully (trac #4352).

I've attempted to fix http://dev.piwik.org/trac/ticket/4352 myself by making the HTTP method and versions (the spaces surrounding them, really) optional. With this patch, I was able to import a few hundred of our sites.

Feel free to cherry pick any/all of it and adjust the style.