Speed up get_median_delegate_price() by caching list of active delegates.
Add debugging function used in wallet_tests to dump the size of databases.