dispatcher: add priority column

This is useful for "first entry" algorithm, where you can now
order the entries regardless the database order
dispatcher: fix possible bogus gateways

In case the domain name can not be resolved, the destination should
be droped and the number of destinations within the set should not be
increased.