Fixes various issues with brotli compression
Fixes various issues with brotli compression

brotli API needs operations to be repeated until done.
flush needs to occur after block is processed.
put all brotli code paths under HAVE_BROTLI_ENCODE_H.
merge redundant code paths into a single function.

Addresses issue #2965 and #2947

SolidWallOfCode/trafficserver,davidbz/trafficserver,vmamidi/trafficserver,persiaAziz/trafficserver,duke8253/trafficserver,chitianhao/trafficserver,duke8253/trafficserver,persiaAziz/trafficserver,chitianhao/trafficserver,vmamidi/trafficserver,pbchou/trafficserver,duke8253/trafficserver,pbchou/trafficserver,chitianhao/trafficserver,dyrock/trafficserver,SolidWallOfCode/trafficserver,pbchou/trafficserver,dyrock/trafficserver,pbchou/trafficserver,bryancall/trafficserver,dyrock/trafficserver,vmamidi/trafficserver,davidbz/trafficserver,pbchou/trafficserver,persiaAziz/trafficserver,bryancall/trafficserver,davidbz/trafficserver,bryancall/trafficserver,dyrock/trafficserver,pbchou/trafficserver,SolidWallOfCode/trafficserver,persiaAziz/trafficserver,chitianhao/trafficserver,duke8253/trafficserver,SolidWallOfCode/trafficserver,chitianhao/trafficserver,bryancall/trafficserver,SolidWallOfCode/trafficserver,davidbz/trafficserver,vmamidi/trafficserver,davidbz/trafficserver,bryancall/trafficserver,persiaAziz/trafficserver,dyrock/trafficserver,persiaAziz/trafficserver,vmamidi/trafficserver,SolidWallOfCode/trafficserver,duke8253/trafficserver,persiaAziz/trafficserver,chitianhao/trafficserver,SolidWallOfCode/trafficserver,persiaAziz/trafficserver,duke8253/trafficserver,vmamidi/trafficserver,duke8253/trafficserver,dyrock/trafficserver,chitianhao/trafficserver,dyrock/trafficserver,bryancall/trafficserver,davidbz/trafficserver