A Continuum Model for Flocking: Obstacle Avoidance, Equilibrium, and Stability