Implement "getchains" RPC command to monitor blockchain forks.

Port over https://github.com/chronokings/huntercoin/pull/19 from
Huntercoin:  This implements a new RPC command "getchains" that can be
used to find all currently active chain heads.  This is similar to the
-printblocktree startup option, but it can be used without restarting
just via the RPC interface on a running daemon.
If you make the comparator support multiple blocks at the same height, you could just use that comparator directly as internal sort for setTips, so you don't need the vector or the explicity sort, and can just iterate through setTips (use BOOST_FOREACH, btw).