Optimal Control of Switched Positive Linear Systems