Take mutex in close(), and skip write path after turning bluetooth off. BUG=1751710 Automated import of CL 144150