devide bad_lexical_cast from std::exception
use use_undo=false for [do_command]

...if we are already in a synced_context.

undoing usually also removes things from the replay, so we cannot undo things if the don't put things in the replay.
replace wesnoth.is_synced() with wesnoth.current.synced_state

 making it a proxy field instead of a function makes it easier to use.
 Also we now return a string so the luadev can distinuish between
 'local_choice' and 'unsynced' which might be useful because [do_command]
 cannot be used from 'local_choice'.