Fix detection of canonical machine types on RHEL 6

The capabilities XML on RHEL 6 lists the canonical machine in a separate
element, prior to the element containing its alias:

    <machine>rhel6.4.0</machine>
    <machine canonical='rhel6.4.0'>pc</machine>

If we find a matching machine that doesn't declare a canonical type, keep
looking for one that does.