Introducing General::intval()

This method will insure that we are really dealing with a positive integer before trying to cast it.

This should eliminate nasty side effects like casting '1234a' to 1234.
Use General::intval to cast system:id

This will make it safer and should fix #2191
Merge pull request #2195 from DeuxHuitHuit/issue-2191

Filtering on the `system:id` using an invalid value will now return nothing instead of casting it blindly to an ID. Fixes #2191