Overall, the alt template basically changes abilityn, with its myriad values, to abilitylayout, with a small number of more understandable values. The alt template's layout parameter takes values which have the form "x(+y)", where x is the number of cells in the first row and y is the number of cells in the second. (All possible values of x and y don't necessarily act differently, but I think that's made up for very well by just carrying a very plain meaning.) The alt template doesn't rely on abilitylayout to control which Abilities are shown like the current template relies on abilityn; instead, it basically just tries to show anything that's been set. If a lot of values are set and an inappropriate abilitylayout value is set, this could make things weird; but we shouldn't have inappropriate values, so hopefully it'll be alright. There's also a new/extra parameter for when abilitylayout=2+1: abilitycold/abilitycolm set a colspan value for the HA (abilityd) or Mega (abilitym) cells so that the appropriate one spans both cells that are above it. (As an option, this could also be handled with a parser function or two instead.)
Another goal of this is to hopefully just be more flexible as well. It's hard to test every possible permutation, but at the very least it doesn't lock us in to only the things strictly accounted for by abilityn.
This can also be set up very well beforehand so that updating the infobox template won't break things. (If desired, abilitylayout could be defaulted to 2, which is the most common format--accounting for 582 pages as of Gen VI--so that fewer pages will need changing.)
The one difference in outputs below is that N:d2 (only used for Meowstic) doesn't have a form label below the standard Abilities. I think it's alright like that. But it shouldn't be hard to adjust if necessary.
Below are all possible abilityn values in action on the right, with the same effect replicated in the alt template on the left.