The HARPS search for southern extrasolar planets - XXV. Results from the metal-poor sample