Fix counter rpc
Implements issue #66 (closed). Fixes a quirk in the RPC returning the counter of a given contract, which returns the next global counter if the counter is null, and can be exploited to check whether an account is revealed or not.
Edited by Alvaro Garcia