Fix internal SharedArray function range_1dim

Fixes the case when length of the array is smaller than
number of pids.
Small formatting fixes in SharedArray

(mostly trailing whitespace)
Add return statement to map! on SharedArrays
Add distributed copy! for SharedArrays
Fix #6362 (deepcopy broken for SharedArrays)