Fix aligned_alloc() and posix_memalign() check.

The check for aligned_alloc() and posix_memalign() will not work because config/xclang does not support -g and -O1, -O2 flags.  Besides, due to the implicit function declaration rule in C89, the AC_COMPILE_IFELSE() is not strong enough to guarantee the existence of the function.  We should use AC_LINK_IFELSE() instead.

This branch also fix a minor bug: the #if..#endif should not cover pocl_create_event() and pocl_create_command() in pocl_util.c.  This bug did not break the build in the past because neither aligned_alloc() nor posix_memalign() can't be detected.