client-side JS: we'll have everything live under an app "global" object

#226
starting to move some variables into other files #226

Unfortunately these are all being defined as "global" variables for now.
more organization for keyboard codes
organizing modes into a hash
organize errors into a hash
they probably should be called "constants" rather than "variables"
move some segment and street variables and functions into separate files #226