Trajectory Optimization for a Mission to the Solar Bow Shock and Minor Planets