Fremont to end contract with controversial animal shelter