Optimization of Low-Cost Monitoring Systems for On-Site Earthquake Early-Warning of Critical Infrastructures