Enable searching for tickets by external_id

It is currently not possible to search for tickets by external_id, which is extremely important for API integrations (so you can retrieve tickets by their local record id). This patch adds in that capability.