Energy and Memory Efficient Clone Detection in Wireless Sensor Networks