The libraries that will survive are the ones that let their communities shape them, writes Carla Hayden.