New Hampshire town loses First Amendment case over trying to bring criminal charges against bakery