scaling the aggregate state switched to follow the 2^N principle

The original approach to scaling aggregate state (to accomodate more
elements) contradicted the 2^N rule, used in the allocation set
implementation, and resulted in excessive repalloc calls and and
a bit of additional memory overhead.

While being mostly harmless (the repalloc calls were not doing much
and thus were cheap, and the memory overhead was negligible), it was
rather ugly and overly complex. So rewritten to follow the 2^N rule.

The initial number of elements is chosen to occupy 32B, so for 4B
values (int32) it's 8, for 8B values (double, numeric) it's 4.
code cleanup and trivial simplifications

Mostly removal of excessive whitespace and brackets, and generally
making it more compliant with PostgreSQL code style.

Also, some trivial code changes were done (e.g. allowing to simplify
some branches etc.).
simplification of the code in _array final functions

Originally the functions were prepared to process quantiles outside
the expected interval [0,1], but since check_quantiles it's not
necessary. The code now follows the single-quantile approach, making
it much simpler.