Update Arduino version.

Codebender now uses the latest stable Arduino software.
Add break statement in default case.

Though not required, a bit of defensive programming never hurts.
main(): use ternary operator for Leonardo flags.

Improves readability.
validate_input(): Check for existance of entities.

Better check for request structure, which must now contain all needed
entities. The compiler will deny any malformed requests.

Also takes into account the Leonardo-specific flags and eliminates PHP
notices for undefined properties.