Fix MathText detection regexp.

The TextRenderer class was not identifying MathText strings that
start with "$" properly. This fixes the issue and tests the fix.

Change-Id: I35f08b4ec254429a88bd0b805a1ce8c33195d4e6
Merge topic 'TextRenderer-fixRegExp' into master

98a40d34 Fix MathText detection regexp.