Replace ARRAY_ACCUM() custom function with ARRAY_AGG()
Tested each replacement to ensure that the return of NULL instead of
'{}' empty array doesn't break anything - although some functions didn't
seem to work with either function (for example,
asset.merge_record_assets() doesn't seem to actually move an 856 from
the source to the target record).
Also replace ARRAY_TO_STRING(ARRAY_AGG()) with STRING_AGG() in a couple
of places; see
http://www.depesz.com/index.php/2010/02/17/waiting-for-9-0-string_agg/
for one reason why (likely performance gain).
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>