astakos: Use bulk_create to speed up commissions

Update holdings and create provisions and log in bulk when issuing or
resolving commissions to speed up the operation,
astakos: update action logic

The following changes are made to the way actions are validated:

* accept: Accept only unmoderated or rejected users.
* deactivate: Deactivate only moderated users. This includes inactive
  users, solely for the purpose of changing their deactivation reason.
* send_verification_mail: Renew verification code and send it only to
  users with unverified mail.
astakos: Update user logic tests

Update tests according to the changes in activation_backends.py

closes grnet/synnefo#164
pithos: Add missing index

Add index on column 'node' of the ''versions' table.

closes grnet/synnefo#161
pithos: Perform size checks during uploads

Verify the consistency between the declared size
and the object's hashmap during uploads/object updates.
pithos: Fix test

The specific test challenges the object upload
by providing the object's hashmap instead of actual data
while not all the respective blocks are previously
uploaded to the storage (409 Conflict status).
However, this test will fail if all the blocks
are stored to the backend
by preceding uploads / test executions.

This commit changes the test in order to upload random data
and, hence, it reduces the possibility of block collisions.
pithos: Refactor statistics subquery

Use CTE to get current population.