Improve __alloc_size__ detection

Since `__clang_major__`/`__clang_minor__` etc. are vendor dependent values,
we cannot implement the feature detection based on it.
For example, Apple clang versioning is different from the FreeBSD clang.
(At this time, Apple clang version is `"6.0 (clang-600.0.51)"` and
`__clang_major__` is 6)

Instead of this, we can use the clang feature detection macro,
`__has_attribute`.