Add new build option useSourceMaps.

True (default) results in source map generation, when supported
by the optimizer. False results in no source maps.

Fixes #17425.

This is an enhancement backport. Rules exception approved by
@dylans.

(cherry picked from commit 5f4add868fd45d8553ce462af73e883dd772f9c6)