Api: Move request into separate method

This moves the actual HTTP request into a separate function so we can
eventually move response parsing into the AsyncTask so it isn't
performed on the UI thread.
Api: Parse responses in AsyncTask

This offloads the JSON parsing of API responses to the AsyncTask.
Api: Prepare for stored API responses

Moves the auth token and userid retrieval to the very beginning of the
call so they can be set externally and the internal code doesn't have to
call MainApplication.get().getUser().
Api: Store and retrieve API responses

This stores API responses in a database so they can be used in place of
live requests when the user doesn't have internet.
ApiDatabase: Use context.getApplicationContext()

Just in case the application context isn't passed in. Otherwise we will
be leaking a context since the DB will be around for the entire process
lifetime.
ApiDatabase: Don't close DB connections

Turns out there isn't a need to close the connection because
get(Writable|Readable)Database() likes to reuse the same instance but
can't if we close the connection.

I found this in the source code because I couldn't find any good
documentation on the matter, naturally.
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/database/sqlite/SQLiteOpenHelper.java#L195
Api: Replace database with file cache

Turns out reading/writing from a sqlite database is pretty darn slow.
Reading/writing to/from a file turns out to be much faster. This data
also shows up under "Cache" in the App Info settings page so users can
clear that out independently from the core app data.

Note: The DB class is still around because we will eventually use it for
storing offline guides and converting it from its existing state should
be pretty straightforward.
Upgrade gradle-android-plugin to 0.7

Unfortunately this results in some duplicated code because buildConfig
was changed to work on individual fields with buildConfigField so you
can't construct the value in a method.
Fix DEV_SERVER in release

Turns out you need to pass in a string that contains 2 double quotes.
Rename login package to auth

This is in preparation for the AccountManager refactor where auth makes
more sense than login.
Initial AccountManager integration

It's still really rough around the edges but it adds a new account when
the user authenticates.
Move user account persistence to AccountManager

Rather than storing the data in SharedPreferences and in the Account,
lets just make AccountManager the canonical source.
Stub out reauthentication in Api

Not done yet, but this is the basic flow of what should happen when the
user's auth token expires.
Include email/password in Account

It will be retrieved when performing reauthentication if an auth token
expires.
Add email to User

It'll be used for reauthentication.
Include User in ApiCall

For reauthentication.
Add Site to ApiCall

Again, for reauthentication.
Authenticator: Get AccountManager in constructor

No need to get it in every method that needs it since it's such a short
lived object.
Api: Reauthenticate when authToken expires

This attempts to reauthenticate the user and get a fresh auth token if
the existing one expires.
Handle changed password reauthentication

This is almost gracefully handled -- the user is prompted to
reauthenticate if the automatic reauthentication didn't work, the
account is left with an invalidated auth token, when the new auth token
is created, all account info is updated with any changes.

The only problem is if the user signs into a different account than the
one we already have. It needs to delete the old one and create a new one
rather than updating the old one.