Optimal Control Laws for Heliocentric Transfers with a Magnetic Sail