Thermal and electronic contributions to switching in melanins.