Use a proper sqlstate with non-setof function errors

Refactored plproxy_error function into plproxy_error_with_state which
accepts an sqlstate argument and made plproxy_error a macro that calls
plproxy_error_with_state with ERRCODE_INTERNAL_ERROR.

Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>