added a comment - - edited
I've actually just been working on a possible patch for the same problem so thought I'd add to this stream.
I have kept it a bit simpler though by merely shifting the HTML markup from the included file to the core renderer. The structure and use of the coded HTML forms is effectively the same, aside for a small breakup of the overall code into small helper functions where it helps with understanding the structure.
My thinking is that this issue seemed originally intended to solve a background "visual" change and no huge chunks of functionality should actually be affected as part of it. So the larger changes such as moving to use Moodleforms, fixing values where constant definitions would make more sense (which are used in a bigger scope than just this area anyway) and expanding on the amount of authentication plugin control should all be separated out; resolved and tested independently.
The commit I've created for the renderering is here https://github.com/lamiette/moodle/commits/MDL-29940 I realise it won't make it into 2.5 with the current code freeze but it's here for review anyway.
I actually started on this because I needed to have greater flexibility with the way the potential IDPs were displayed (removing the requirement for the icon value) and figured the HTML itself could be improved first. I've put in the minor change I needed of the potential_idps(..) display not breaking if no icon is supplied and this seems reasonable for all authentication plugins. I've also left in a couple of ToDo comments around the idea of moving this to the authentication plugin itself as I think it'd make more sense if the auth could choose how and what to display as it wishes and not be so restricted by core.
I'll create some more issues to separate out these and will link to the relevant ones here for future tracking.