pfx: fix possible memory leaks in pfx_table_del_elem() on realloc error
pfx: fix possible memory leaks in pfx_table_del_elem() on realloc error

Fix the following issues:
- when realloc failed, data->ary became NULL and the previous memory
  area was leaked
  If realloc() fails the function now returns an error and keep the old
  memory area. If the element wouldn't have been at the of the list
  before, it would be then.
  Before the realloc() all elements are shifted to the beginning so that
  the not needed memory area is at the end and it can be resized.
  If realloc() failed the element that was planned to be deleted would
  then be inserted as last element in the list again. So that the
  dataset is not changed in a case of an error.

- when the last element was removed from data->ary, realloc() was called
  with a size of 0 to free the array.
  On Linux a call to realloc() with size of 0 behaves like a free.
  BUT on BSD systems a size of 0 means that the original data area is
  freed and a minimum sized data area is returned.
  This would have been leaked in the previous version.
  (http://www.manpagez.com/man/3/malloc/)

rtrlib/rtrlib,rtrlib/rtrlib,rtrlib/rtrlib