Integrate powers of $\tan x$ and $\sec x$ (#570)