Simplify handling of AST expressions' line numbers.

Use as few as possible.

Change-Id: I83d6c1cdd73947af79c3f7cad90ddfe268783fab
Reviewed-on: http://review.couchbase.org/37524
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>