Fix Mojo::DOM::attrs deprecation and hash sort on 5.18.0

Fixes the deprecation notice regarding Mojo::DOM::attrs which changed from plural to 'attr' singular.
This also fixes a failing test on Perl versions 5.18.0