Increase allocation chunk size + minor refactoring

This is a reboot of hpohl's https://github.com/D-Programming-Language/dmd/pull/2470

I didn't find any improvement in increasing the chunk size, but 64Kb is ridiculously small and I changed it to 1Mb anyway.

The minor refactoring is the same as in #2470