SurfaceFlinger: fix a crash with RefreshRateOverlay

 - Fix a nullptr deference in createLayer
 - Add a test for RefreshRateOverlay

Test: adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test
Bug: 169867983
Change-Id: I496aaeceaa86b55f806ddc921fc5b050417725b7
4 files changed