Synthesizing Component-Based WSN Applications via Automatic Combination of Code Optimization Techniques