Add adaptive chunk size logic.

This commit adds adaptive chunk size logic and handles potential HTTP
errors (particularly 502) that sometimes happen with bitcoincharts. This
functionality relies on the deprecated start parameter of bitcoincharts
which is, as of the time of this commit, still functional for limiting
the number of trades returned.