Selective Reprogramming of Mobile Sensor Networks through Social Community Detection