SurfaceFlinger: Hold lock while constructing BufferStateLayer

This mirrors the createBufferQueue layer function. We have a crash
cluster around here and I'm not able to think of a better explanation.
Still unsure exactly what would trigger the problem though, will
monitor if this stops the crashes.

Bug: 173538294
Test: Existing tests pass
Change-Id: Id3324ebdde6f4b83274abddba59bb8c2adc68a36
1 file changed