A Topology-Preserving Level Set Method for Shape Optimization