Makefile: Handle '#' in COMPILE_OPTIONS (#15070)

Teach the Makefile generators to escape '#' characters on the right hand
side of variable assignments in flags.make.  This is needed for flags
like '-Wno-error=#warnings'.  Otherwise the make tool treats them as
comments and leaves them out of the _FLAGS variable value.

Add a case to the CompileOptions test covering '#' in a COMPILE_OPTIONS
value, at least on compilers where it is known to be supported.
Merge topic 'makefile-assign-escape-octothorpe' into next

fbf7a929 Makefile: Handle '#' in COMPILE_OPTIONS (#15070)