Adding scripts for getting data into dev_appserver.

These changes do not change the way the application runs on GAE but are
necessary for locally testing operations that operate on data.

server/download_dev_data.sh:
There is a documented procedure to download data from the datastore
hosted on GAE to a local SQLite3 file using the appcfg.py utility, but
it is a little cumbersome so why not sutomate it.  This does not pruduce
data that the dev_appserver can use so we need to "upload" the data we
just downloaded into the dev_appserver.

server/upload_local_data.sh:
This basically puts the data into the datastore that is referenced by
the dev_appserver.  To make use of this you will need to run the local
instance and make sure that you are using the lines for large data
operations.  This will ensure that you don't have to do this twice.

server/script_config.sh:
When writing the scripts for downloading and uploading data there were a
lot of shared values and configuring things was becoming confusing.
Factored out the variables into one file that can be sourced into the
other scripts.

server/update_dev_server.sh:
Changed due to refactoring above.

server/run_server_locally.sh:
Changed due to refactoring above, and added some configuration to limit
the amount of debuging messages displayed and sourcing the data
downloaded from GAE.
Responding to feedback for commit 365a6bbb5bf8.

Fixed typo in upload_local_data.sh, removed line from
download_dev_data.sh that made a backup copy of the downloaded data, and
gave the user warning that we would be writing to a few files.  This is
also an attempt to try rebase instead of pull from master.  The former
seems to be a bit noisy.
Small bugfix for commit 365a6bbb5bf8.

server/upload_local_data.sh:
We should be reading from the same file that the
server/download_dev_data.sh script saved the data in.  Changed
$DATA_PATH to $DOWNLOAD_DATA_PATH.
Merge pull request #32 from gavaletz/archive_dev2

Archive dev2
Adding scripts for getting data into dev_appserver.

These changes do not change the way the application runs on GAE but are
necessary for locally testing operations that operate on data.

server/download_dev_data.sh:
There is a documented procedure to download data from the datastore
hosted on GAE to a local SQLite3 file using the appcfg.py utility, but
it is a little cumbersome so why not sutomate it.  This does not pruduce
data that the dev_appserver can use so we need to "upload" the data we
just downloaded into the dev_appserver.

server/upload_local_data.sh:
This basically puts the data into the datastore that is referenced by
the dev_appserver.  To make use of this you will need to run the local
instance and make sure that you are using the lines for large data
operations.  This will ensure that you don't have to do this twice.

server/script_config.sh:
When writing the scripts for downloading and uploading data there were a
lot of shared values and configuring things was becoming confusing.
Factored out the variables into one file that can be sourced into the
other scripts.

server/update_dev_server.sh:
Changed due to refactoring above.

server/run_server_locally.sh:
Changed due to refactoring above, and added some configuration to limit
the amount of debuging messages displayed and sourcing the data
downloaded from GAE.
Responding to feedback for commit 365a6bbb5bf8.

Fixed typo in upload_local_data.sh, removed line from
download_dev_data.sh that made a backup copy of the downloaded data, and
gave the user warning that we would be writing to a few files.  This is
also an attempt to try rebase instead of pull from master.  The former
seems to be a bit noisy.
Small bugfix for commit 365a6bbb5bf8.

server/upload_local_data.sh:
We should be reading from the same file that the
server/download_dev_data.sh script saved the data in.  Changed
$DATA_PATH to $DOWNLOAD_DATA_PATH.
Adding utility functions for data archival process.

These files will be used to serialize and compress entities from the
datastore on GAE into a zip file.  Handlers for triggering these
functions will be in the next CL.

server/gspeedometer/helpers/archive_util.py - see file commentary for
details on what functions have been added.

server/gspeedometer/helpers/util.py - added a couple comments about
issues that need to be addressed.  Issues will be added in the github
issue tracker.  One problem is that it is possible to have dangling
references when some data is removed and ConvertToDict will throw a
ReferencePropertyResolveError.  The other problem is that
ConvertFromDict does not seem to be able to deal with unconverting
output from ConvertToDict in some cases.

server/gspeedometer/model.py - added a function that will take a string
and return the class that is represented by that string.  This avoids
evaluation of the string and the possible security issues that brings.
Responding to feedback for commit e27c1fa50342.

The big change here is that for now we are going to support only the
export of measurement types.  This reduces the code base considerably and
takes advantage of more existing code.

server/gspeedometer/controllers/measurement.py - code for taking a list
of measurement entities and changing them into a list of dictionaries
has been moved to server/gspeedometer/helpers/util.py.  This is needed
since we would like to support more variety in how we obtain a list of
measurements.

server/gspeedometer/helpers/archive_util.py - removed methods needed for
importing data and the ArchivePack method.  The MeasuermentListToDictList
(taken from server/gspeedometer/controllers/measurement.py) will be used
over the ArchivePack method.

server/gspeedometer/helpers/archive_util_test.py - unittests for the
methods added with server/gspeedometer/helpers/archive_util.py.

server/gspeedometer/helpers/util.py - code added from
server/gspeedometer/controllers/measurement.py.

server/gspeedometer/model.py - removed unneeded method for looking up a
class by string.
Adding request handlers for data archival process.

These changes will allow measurement data from the datastore to be
downloaded as a zip file, or posted to Google Storage for Developers as
a zip file.  The data can be grouped my device, date or both.  Having
the ability to archive by device allows for any user to see his data and
would allow something akin to the "takeout" service that Google
provides.  The drawback is that this requires another index to be
maintained and increases the overall costs for writes to the datastore.

server/app.yaml.tmpl - adding the requirement that requests made to any
/admin/* URL can only be made by those with admin access to the GAE
instance.  This is sufficient since anyone with GAE admin access would
have access to the whole datastore anyways.

server/gspeedometer/config.py - adding configuration points for Google
Storage for Developers.

server/gspeedometer/controllers/archive.py - adding request handlers for
downloading data and sending it to Google Storage for Developers.  These
requests would normally be handled by backends and would be used with a
chron job.

server/gspeedometer/helpers/util.py - fixed a copy/paste refactoring
problem from commit c40a958e5cea.

server/gspeedometer/main.py - adding our new handlers to the django
mapping.  See the changes to server/app.yaml.tmpl as well for security
implications.

server/index.yaml - new index added to allow for filtering measurements
by device_id.
Responding to feedback on commit f6d36a9e12bb.

/server/gspeedometer/config.py - made archive variables more obvious.

/server/gspeedometer/controllers/archive.py - re-factored the method to
create a file name based on parameters.  Fixed some typos, and renaming
of variables.

/server/gspeedometer/controllers/archive_test.py - unit test for the
method to create a file name based on parameters.

/server/gspeedometer/controllers/measurement.py - fixed typo and added
some TODOs.

/server/gspeedometer/helpers/archive_util.py - fixed some syntax issues
and renaming of variables.

/server/gspeedometer/helpers/util.py - fixed typos.

/server/gspeedometer/main.py - fixed renaming of variables.
Merge pull request #35 from gavaletz/archive_dev3

Archive dev3 - Adding request handlers for data archival process.