[net] Add role for user

  - fix a issue with search_emailusers
  - fix bad memory usage
  - add id column for mysql
  - returning role string is not NULL string now
Merge pull request #49 from Chilledheart/usermgr_add_role

 [net] Add role for user
[build] add cmake build system

 - add missing includedir for cmake
 - remove shared library version
Resolve pidfile resource leaks

This patch resolves resource leaks caused by not closing the file streams upon
an write error.
[lib] removal of unused code
[build] correct sed usage
[build] fix bus error while execute make -jN (N>1)

 - please use latest version of seaf-codegen.py,
    at least contains the one in haiwen/libsearp#17