Fixed DOS condition in the calc module

Supplying complex expressions like 9**9**9**9**9**9**9**9**9**9**9**9
to the calc module will cause the bot to hang and subsequently time out.

This commit introduces a new function run_with_timeout that executes
the given function and kills it after the given number of seconds (5 by
default).
It does that by spawning a seperate process to do the work since
processes can easily be terminated.