election_condition: make conditions more flexible.

API change: the required 'callbacks' key for each condition has been changed to a 'callback', and the 'data' key has been added.

See election_condition.api.php.
Issue #2228595 by axle_foley00: fix "Unknown column 'base.published'".