Encode gcodes properly prior to uploading

Fixed to URI encode all gcode strings properly. Increased max upload
buffer size. Reduced the amount of filament that has to be consumed
before we use it to provide an estimate of completion time from 5% to
3%.
Increased upload speed of large files

Increased upload speed of large files. Previously, the upload speed
decreased with increasing file size. Now uploads a 10Mb file at
2.2Mb/min.