Added support for 3D automaton

Everything should be Tested.
Code re-organized
Added 3D memory linearization

IMPORTANT: Neghborhood calculation is INCOMPLETE -> it means function
that calculate linear memory index for a neighbor i has to be
implemented (moore 27 neighbors)