This is basically copying over @anton's great script!
Also had to run `make format` to make this pass `test_lint`.
This PR also makes the make commands for tools further align
with the tendermint implementation.
* Adds a Min function to Int, and uses that in the slash function
* Adds a getHeight helper function to iavlstore
* Adds a splitPath function to baseapp
* Changes cyclo param from 10 to 11
Gocyclo is a code complexity linter. It uses cyclomatic complexity.
Cyclomatic complexity essentially measures the number of different
paths code could go through. (The conditional in a for loop counts
as adding one path) It looks at this on a per-function level. The
idea that this would be enforcing is that if there are too many
different paths code can go through in a function, it needs to be
better split up. (A function with too many code paths is hard to
reason about)
The complexity which we want the linter to start failing on is
configurable. The default is 10. Change the "Cyclo" parameter in
`tools/gometalinter.json` to try other values.