Force to return sortindex as an integer

In some circumstances sortindex is returned as a string. This makes the
Sync service not work in combination with Firefox Mobile, as its parsing
is stricter than in normal Firefox.

This behaviour was observed in PHP 5.3 in combination with MySQL 5.5.
Explicit type casting to integer should fix this.

See issue #7
Explicit type casting of sortindex also in getWBO()
Refactoring explicit type casting
Merge pull request #10 from owncloud/force_sortindex_int

Cast sortindex to int