The invocation by the Rev. Joan Montagnes, minister of the Unitarian Universalist Church of Buffalo, where Fillmore was once a member, touched on the last Whig president’s uneven political legacy.