openelex management command

Instead of using invoke to run our tasks, use our own ``openelex``
management command.  The main motivation for this is to be able to
run the command from any location and not just from the ``openelex``
directory in the project's working copy.

The management command uses the click library (http://click.pocoo.org)
to handle options and the nested command routing.

Update the setup.py file to use setuptools instead of distutils to
leverage the ``entry_points`` argument to automatically create
the ``openelex`` script.
See
https://pythonhosted.org/setuptools/setuptools.html#automatic-script-creation
and http://click.pocoo.org/3/setuptools/#setuptools-integration

Addresses https://github.com/openelections/core/issues/217
Add dependencies to setup.py

Add dependencies to setup.py using the ``install_requires``
argument to ``setup()``.

Pare down the list of dependencies
from the one in requirements.txt to only include the top-level
dependencies that are directly imported in the openelex package.
It looks like the original list in requirements.txt was created
by someone just running pip freeze.

Addresses https://github.com/openelections/core/issues/217
NC 2000 primary dem auditor loader
Update installation instructions

Update installation instructions in the README so they instruct the
user to install the ``openelex`` package as an editable package
by running:

pip install -e .

This will automatically put the package on the virtualenv's
PYTHONPATH and create the ``openelex`` executable, so instructions to
do that explicitly are no longer needed.

Remove the ``bin/openelex`` wrapper script since we're now using
setuptools to create the executable.

Addresses https://github.com/openelections/core/issues/227
DRY up requirements.txt

Now that dependencies are in setup.py, DRY up the requirements.txt
using the pattern described at
https://caremad.io/blog/setup-vs-requirement/
Merge branch '217-openelex_command' into dev
re: issues/230
some updates
typo
Merge pull request #232 from EricLagerg/dev

Add default value for ``datefilter`` option for management commands that take it.  When a default is not specified, click seems to set the default value to ``None`` if the option is not specified, which clobbers the default value in the function signature.
Remove us/base/mappings/base.csv

This file is auto-generated and shouldn't be in version control
at the moment.

It appears to have been accidently commited in
7f9fa309c42445c21113a2e9ee7000c247348a74
Use vote_breakdowns and votes_type correctly

My original intent was to eliminate ``RawResult.vote_breakdowns`` and instead create separate ``RawResult`` records with different ``votes_type`` values.
Then we could aggregate these into ``Result.votes_breakdowns`` in a Transform.  It turns out that transform is really, really slow because for each result, you have one query to get all related RawResults that provide the breakdowns.

Using vote_breakdowns is a good, space efficient way to represent this.  We should keep using it and instead only use ``votes_type`` to disambiguate the case when the value in the ``votes`` field isn't the total because the source file only includes one kind of vote tally (frequently election day).

There should be one RawResult per candidate, per row in the source data.  In some cases, this means setting ``vote_breakdowns``.  In others, it means creating a separate ``RawResult`` for each type of vote and setting ``votes_type`` and aggregating these in a transform.  The goal should be to keep loaders simple and make ``RawResult`` instances roughly follow the layout of the source data.

Add ``votes_type`` to ``Result`` model.

Use ``None`` instead of an empty string for the value of ``votes_type`` when the value of ``votes`` are total votes.

Update Iowa loaders to use either ``votes_type`` or ``votes_breakdown`` when appropriate.  Fix setting of ``votes_type`` flag in ``PreprocessedResultsLoader._prep_precinct_result()``.  The ``votes_type`` field was being set to 'absentee_provisional' regardless of whether it was actually an absentee or provisional vote.

Set the ``vote_breakdowns`` field in ``ExcelPrecinct2010GeneralResultLoader`` if the breakdowns are in the same row.

Update ``ExcelPrecinct2010GeneralClintonResultLoader`` to produce a ``vote_breakdowns`` field.

In Maryland's ``MDLoader._prep_precinct_result()``, set ``votes_type`` to ``election_day`` instead of setting ``vote_breakdowns``.  There aren't any vote breakdowns, just no total votes.

Update NC loaders to set ``RawResult.votes_type`` when appropriate.

Addresses https://github.com/openelections/core/issues/211
Fix command line options for bake tasks

Add a default ("csv") for the ``--fmt`` option.  Specify that
the ``--raw`` option is a flag.

These are things that got overlooked in the invoke to click
transition.
Fix vote_breakdowns in MD loader

The dictionary was being created, but not being set on the model.

Also, convert values to int.
more 2000 loader work
Merge branch 'dev' of https://github.com/openelections/core into dev
Handle Iowa preprocessed racewide results