Lightly oil a quarter sheet pan. In a small bowl, combine the onion, cornmeal, sugar, salt, and pepper. In a small saucepan, combine the stock and cream, heating the mixture to just under a boil. Whisk the dry ingredients into the saucepan of liquids, lower the heat, and cook until very thick, about 15 minutes. Remove from heat, and pour the polenta onto the oiled half sheet pan, pressing into an even layer. Chill for 4 to 6 hours or until completely firm.