Extend atoms array faster, follow more theoretical approach

In fact to ensure that amortized time is O(1) we should multiply
array size by 2 each time.
Accept third argument in arrays.copy() function, update serialize method