Support the getpeerinfo() api call

Support the getpeerinfo() api call. Not much to say here. Message me if you need anything modified. Thanks.