Although the use still outpaces the world in spending on research and development, a shrinking federal investment could allow China to soon take the lead on spending.