Fix small issues and improve formatting in optimize tutorial
Add Result class to optimize API docs
Merge pull request #3010 from cdeil/optimize_docs

DOC: optimize: add Result to API docs + fix tutorial