Changing unit tests to use RPCs instead of action nodes.

Code is about the same complexity, but RPCs are what we do
in prod, so this removes the duplicate code.
Merge branch 'master' into replication
Making shard comparison case insensitive in another place.