mesh: Refactor friend.c and net.c for central key DB

To enable multiple local nodes and friendships to
coexist, and minimize redundant encryption processing
5 files changed