Merge pull request #188 from mtomaschewski/array-remove

utils: properly adjust array in remove actions
utils: use proper index in ni_string_array_remove
socket: use proper array in socket array activate