MB-12629: fix crash if fdb_shutdown and fdb_open race

Fail fdb_shutdown if fdb_open is in progress
Incorporated Tommie's unit test case to validate
Change-Id: I5825f1bf236238ffc9eb69c5c1356a990fe5b569