bt_lib: Fix encoding of Field() in DataStruct
bt_lib: Support dynamic CID
server: Move emulation code to emulator.py

Also implement initial emulation for a BT keyboard (SDP records taken
from an actual keyboard).
bt_lib: Use Enum for fixed PSMs
Implement AUTH_REQUESTED command
Implement SET_CONN_ENCRYPT command