Filter the sources before storing them in the database

See https://bugs.launchpad.net/oq-engine/+bug/1246596 : this is a HUGE performance improvements in all event based calculations. For instance, for the Bosphorus computation with  145,010 sources one gets:

before the cure (i.e. current master):

   operation      | cum_time| mem(MB)
   ---------------+---------+--------
   reading sources| 151695 | 443
   computing ses  | 102031 | 11


after the cure:

   operation      | cum_time| mem(MB)
   ---------------+---------+--------
   reading sources|     729 | 26
   computing ses  |  41017 | 0.207

All tests pass.