fix some command definition bug and support Z-Stack Core 2.6.1

1. fix some command handling issues
2. change ZDO_MGMT_PERMIT_JOIN_REQ definition for Z-Stack 2.6.1