qcacmn: Avoid active command removal until activation completes

With the current implementation, the removal of a command
is allowed  before the activation cb returns.

So if a command is removed before the activation returns,
and the activation returns failure, we attempt to access
the command buffer after the cmd is removed happen.

This is now protected by a new flag where if a removal is
attempted before a commands activation cb is completed
the removal request just marks the CMD_MARKED_FOR_REMOVAL
flag and when the activation cb returns, we check if a
commands removal had been attempted. If yes, remove the command
from the active queue.

Change-Id: I53af6706010b50640ea7248085e9fc85908056fa
CRs-Fixed: 2356813
3 files changed