Add benchmarks for Read() and Write()
Run gofmt
Check version on init
Reduce code duplication in init
Merge pull request #23 from fd0/integration-benchmark

Add benchmarks for Read() and Write()
Merge pull request #25 from fd0/minor-improvements

Minor improvements
Send sftp packets in parallel

Benchmarks before:

    BenchmarkRead1k           10     142398598 ns/op      73.64 MB/s
    BenchmarkRead16k          50      32758323 ns/op     320.10 MB/s
    BenchmarkRead32k         100      42391983 ns/op     247.36 MB/s
    BenchmarkRead128k         50      42014906 ns/op     249.58 MB/s
    BenchmarkRead512k         50      32767844 ns/op     320.01 MB/s
    BenchmarkRead1MiB         50      38830615 ns/op     270.04 MB/s
    BenchmarkRead4MiB         50      33023037 ns/op     317.53 MB/s
    BenchmarkWrite1k          10     140492382 ns/op      74.64 MB/s
    BenchmarkWrite16k         50      37735998 ns/op     277.87 MB/s
    BenchmarkWrite32k         50      34301633 ns/op     305.70 MB/s
    BenchmarkWrite128k        50      29061948 ns/op     360.81 MB/s
    BenchmarkWrite512k        50      36087549 ns/op     290.57 MB/s
    BenchmarkWrite1MiB        50      39458367 ns/op     265.75 MB/s
    BenchmarkWrite4MiB        50      32230107 ns/op     325.34 MB/s
    BenchmarkMarshalInit     5000000           651 ns/op
    BenchmarkMarshalOpen     5000000           577 ns/op
    BenchmarkMarshalWriteWorstCase     50000         46544 ns/op
    BenchmarkMarshalWrite1k   500000          2823 ns/op
    ok      github.com/pkg/sftp 39.618s

after:

    BenchmarkRead1k        1    2384703121 ns/op       4.40 MB/s
    BenchmarkRead16k          10     228621739 ns/op      45.87 MB/s
    BenchmarkRead32k          10     110870832 ns/op      94.58 MB/s
    BenchmarkRead128k         50      84249931 ns/op     124.46 MB/s
    BenchmarkRead512k         50      50602856 ns/op     207.22 MB/s
    BenchmarkRead1MiB         50      42256228 ns/op     248.15 MB/s
    BenchmarkRead4MiB         50      42443705 ns/op     247.05 MB/s
    BenchmarkWrite1k           1    2424982321 ns/op       4.32 MB/s
    BenchmarkWrite16k         10     225408069 ns/op      46.52 MB/s
    BenchmarkWrite32k         10     137387045 ns/op      76.32 MB/s
    BenchmarkWrite128k        50      51531852 ns/op     203.48 MB/s
    BenchmarkWrite512k        50      27675801 ns/op     378.88 MB/s
    BenchmarkWrite1MiB        50      23433008 ns/op     447.48 MB/s
    BenchmarkWrite4MiB        50      34278288 ns/op     305.90 MB/s
    BenchmarkMarshalInit     5000000           645 ns/op
    BenchmarkMarshalOpen     5000000           537 ns/op
    BenchmarkMarshalWriteWorstCase     50000         39339 ns/op
    BenchmarkMarshalWrite1k  1000000          2366 ns/op
    ok      github.com/pkg/sftp 42.778s

I also tested a real-world scenario, uploading 500MiB of random data to
a (rather slow embedded) server in my living room:

sftp:

    $ sftp server
    Connected to server.
    sftp> put testdata
    testdata                      100% 500MB  41.7MB/s   00:12

before this commit, with simple client `put.go` and pv (pipe view),
backend is the system ssh client connecting to the sames server as
above, the file is written to the exact same location on the server:

    $ pv testdata | go run put.go
    500MiB 0:00:57 [8.68MiB/s] [=======================>] 100%

With the new code:

    $ pv testdata | go run put.go
    500MiB 0:00:14 [34.9MiB/s] [=======================>] 100%

Then I added 20ms of artificial latency to this server via tc:

    # tc qdisc add dev enp0s25 root netem delay 20ms

Afterwards the difference is even more drastic. First test with sftp
results in 41.7MiB/s. Next with `put.go`, old code is 1.35MiB/s, new
code reaches 30.9MiB/s.