[ticket/12759] Resolve query flooding while displaying large number of custom profile fields

[PHPBB3-12759](http://tracker.phpbb.com/browse/PHPBB3-12759)