Return ACH_CORRUPT when channel has invalid guard bytes

* Change to ach_open(), ach_close()
* Eliminates the assert() checks which are unhelpful to library users
Fix some warnings in newer GCC