Network Coding Strategies for Data Persistence in Static and Mobile Sensor Networks