Fix the segmentation fault in spatialDecompose.f90

Change how array is declared in getBinIndex(),
use allocation method, instead.

With the old way, the compiler would use the memory in "stack",
which results in segmentation fault when data size is too large.