Fixes#35
Updates https://github.com/tendermint/coding/issues/27
Started a doc.go file to provide an overview/high level
dive into the functionality of this repo.
Also added an example_test.go file in which we can
put end-to-end code examples/actual usage patterns
that can be copied and pasted and will always have to
compile when tests are run to ensure that we don't regress.
Add a godoc reference to delegate indexing and references
to that service, thus keeping our library and usages upto date,
instead of relying on generated markdown that goes stale
especially for changing API signatures, and becomes tedious
where someone has to remember to always regenerate the README
markdown and then commit it.
Fixes#24
* Optimized ReverseBytes to:
a) Minimally allocate --> 60.0% reduction in the number of allocations
b) Only walk halfway the length of the string thus performing
byte swaps from left to right. Improves the performance as well.
Complexity is O(n/2) instead of O(n) which is still O(n) but
benchmarks show the new time is in deed 1/2 of the original time.
* Added unit tests and some common cases to ensure correctness.
* Benchmark shoot out results:
```shell
name old time/op new time/op delta
ReverseBytes-4 554ns ± 4% 242ns ± 3% -56.20% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
ReverseBytes-4 208B ± 0% 114B ± 0% -45.19% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
ReverseBytes-4 10.0 ± 0% 4.0 ± 0% -60.00% (p=0.000 n=10+10)
```