Reusing pWrk and pSync arrays when usin shrenew

According to profiling, lots of time was invested in the shmem_barrier_all
before the int_max_to_all call of get_max_alloc.
Now we reuse a pair of pWrk and pSync arrays across different calls so there
is no need for a barrier in the routine.
Removed GMX_SHMEM_INPLACE macro
Fixed memory corruption bug and general cleanup

Tested with 4,8 and 16.
One freeenergy test failed when dd_gather was enabled thus it is disabled in this commit