[ticket/12759] Allow multiple fields to be loaded via get_option_lang

PHPBB3-12759
[ticket/12759] Cache lang options for all fields while displaying

Previously these would be fetched one field at one time, causing a large
number of queries in case there were large number of custom profile fields
and/or unique number of users in areas such as viewing topics. Resolve this
by caching them at once when generating data for displaying them in templates.

PHPBB3-12759
[ticket/12759] Cache the lang options earlier

Previously it would re-run on every post

PHPBB3-12759
[ticket/12759] Make sure $field_id has unique elements

Otherwise it would cause a bunch of repetitive IDs passed to the IN clause

PHPBB3-12759
[ticket/12759] Little code cleanup

PHPBB3-12759
[ticket/12759] Add phpDoc comments to explain get_option_lang

PHPBB3-12759