Pull statistics functions out into a services file.
Merge https://code.google.com/p/oppia
Removed unnecessary import
Add tests for more exploration services.
Refactoring basic state operations.
Where possible, use a user_id instead of an explicit User object.
Missed a couple of changes in the previous commit.
Minor renaming. Move get_all() method to base model class.
Separate the exploration model into a domain object class and a storage class.
Add files missing in previous commit.
Allow explorations to be faked in tests to remove the dependency of the exploration domain object tests on the exploration model storage class.
Move state deletion logic from the controllers into the domain layer.
rename_state() should take state_id as an argument rather than the entire State object.
Store a payload attribute on handlers which use a payload. Move get_state_by_id() into the domain object.
Add an explicit init_state_id property to avoid unnecessary database lookups. Minor refactorings and rewordings.
Clean up export_to_yaml().
Added to_dict method
Added a delete all explorations method.
Added a method to delete all explorations
Removed the to_dict method, because it's now in the BaseModel