core: Use enum name to search providers

Currently we build search queries for providers using the numeric value
of the type, and comparing it to the "providers.provider_type" database
column. But this column stores the name of the enum, not the numeric
value. This patch changes the autocompleter so that it uses the name.

Change-Id: I4822be2cfd57c093d4fdf11f0410c055faea8be2
Bug-Url: https://bugzilla.redhat.com/1145247
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit e9d780841b6a6c984338739d010ff8cc90b2f5ea)