Refactor: controller: best practices for record_pending_op()
Rename to controld_record_pending_op() for planned relocation,
add a doxygen block, and improve log messages, comments, and formatting.
Also, make it return a bool for whether the op was recorded or not.
Nothing uses it as of this commit.