Fix out-of-tree builds

Had to generate (with sed) enterprise_extension.[ch] in source (not
object) directory, because of circular dependency madness. Add all
auto-generated files to CLEANFILES for proper make-clean.
Fix typo in "allowciphers" server control option parsing.
Don't register lock cleanup if WriteLock() failed.

This way we avoid spurious error messages on exit, from when trying to
clear the inexistent lock (minor annoyance seen in the past while
stress-killing cf-serverd).
Turn some "should not happen" comments to UnexpectedError().
Merge pull request #968 from jimis/master

Various small fixes/cleanups
Add convenience this.promise_dirname variable, with acceptance test.
Reformulating code to avoid nasty surprises

GCC emits a warning when a pointer of a certain type is reinterpreted
as something else and assigned. The potential issue is that GCC might
reorder the way the pointer is read/written because it might assume the
wrong type, therefore it is better to avoid such things.
Merge pull request #970 from cduclos/tls-generic-warning

Reformulating code to avoid nasty surprises
Merge pull request #969 from tzz/feature/promise_dirname

Add convenience this.promise_dirname variable, with acceptance test.