API: Add new hook 'APIGetPossibleErrors'

This allows extensions to modify the array.

This completes the serie of hooks for similar get methods in ApiBase.

Change-Id: Ib398f5815ab57f25d56356b0997c55a03fd96874