char server plugins

Rename functions for each namespace/interface.
Split functions to read/write functions.
Move functions to interfaces.
Share interfaces with plugins.
Enable building hpm plugin for char server.
Fix hpm hook gen tool.