Add test for listsinceblock.
Fix bug in listsinceblock found by test.