Explicit type conversions.

Converts possibly floating point numbers from the database into
integers.
Merge pull request #7 from boudewijn-tribler/master

Explicit type conversions.