chmode: Refactor access checks into new function

Took a lot of repeated code and put it into a function chk_access
Add missing declaration for sendto_channel_local_with_capability_butone

Fixes a warning when compiling src/channel.c
Fix warning about passing wrong structs

in src/chmode.c chm_* functions were passing Client structures to
is_halfop is_chanop is_admin is_owner etc instead of a membership struct
Merge pull request #4 from knivey/master

pull request