[ticket/11535] Correctly merge avatar_errors array into primary error array

The $avatar_errors array needs to be merged into the primary $error array
before the group settings get applied. This is currently not the case.
Functional tests for this will be provided by PR #1401.

This should be merged before PR #1401 so I can enable the tests in that PR that are currently marked as incomplete due to this bug.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-11535

PHPBB3-11535