Added check for a power-of-two alignment (the aligned address calculation depends on this)
Moved some common code into AlignedBase, inheriting where appropriate
Cleaned up to standard C++ (size_t should be std::size_t from <cstddef>)