Use add-hook for adding buffer-local hook

Replace edb-line-number with line-number-at-pos.
Remove mutual require between erl, derl and erl-service

Fix some buglets and compiler warnings.
Rename erl-search-function to erl-search-definition

and support searching type definitions.
Merge pull request #36 from leoliu/master

Cleanup, small improvements and remove mutual require