Refactor to avoid O(N*2) lookups during queue recovery

We remove knowledge of queue directories from rabbit_amqqueue, opting
to key index recovery terms off the amqqueue record name (which is a
resource record) instead. Although this simplifies the code somewhat
and avoid a potentially costly lookup during queue initialisation, it
does require a change to the backing queue API, since we now wish for
r_amqqueue:recover/0 to iterate over all the queues (paired with their
recovery terms, if any) and this means passing #amqqueue{} records
around instead of using a #resource{} and/or directory name as keys.

Also see rabbit_recovery_terms:read/1, which has gained an extra
parameter, since during upgrades we have no access to #amqqueue{}
records and /must/ therefore key any upgraded recovery data on the
queue directory (basename) instead. This double keyed lookup is
particularly gross since we could look the dirname up ourselves in
rabbit_recovery_terms:read/1, but doing so avoids the need to export
queue_name_to_dir_name from the qi _and_ calculating the MD5 on the
queue’s name twice, since the qi (which is calling into read/2) has
already done that anyway.