Simplified getPeerID()
Removed methods that are only used by unit tests.
Removed methods in PeerDB which are not useless.
Removed a useless method in PeerDB.