Why do stouts foam so much when you pour them over ice cream? I was just making a stout float and noticed that my beer foamed up a ton. 

It's not a very carbonated beer (there was barely a hiss when I opened the growler), yet the head was several inches with not very much beer poured into the chilled mug.

What causes this massive head and is there a good way to prevent it?
For the same reason that root beer floats behave in a similar fashion.  Even though there is less carbonation than in root beer (and I presume similarly less foam, though still a significant quantity) the irregular surface of the ice cream offers a massively larger number of nucleation sites than the smooth glass of your favorite beer vessel.   These nucleation sites cause the CO2 to come out of solution, and voila, much foam does appear.  I believe that the ice cream has properties that enhance the foaming effect as well.