Be stricter about constant parsing
Be stricter about constant parsing

This change only parses the input string as a constant if there are no
more characters, or if the remaining input implies the parsed constant
is within a function. Otherwise, we rollback and attempt to parse the
string as a name. This is as it's valid in graphite for metrics to begin
with a number, not just constants.

Signed-off-by: Fiona Liao <d6b1cbef95d39cbe1721cb469eb0f39ea6eb0fb9@gmail.com>

raintank/metrictank,raintank/metrictank,raintank/metrictank,raintank/metrictank