Add wrapper for free

For _aligned_malloc calling free is illegal. We need to use_aligned_free
instead.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Check return value of posix_memalign

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Prefer C11's aligned_alloc if it is available

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>