Improved sanitization for Core component database methods

All constructed IN clauses for integer values are now run through
wp_parse_id_list().

Also adds tests for the relevant methods.

Fixes #4992

Props johnjamesjacoby, DJPaul

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7024 cdf35c40-ae34-48e0-9cc9-0c9da1808c22