Towards Thinking-Optimal Scaling of Test-Time Compute for LLM Reasoning