Improve CheckAPIDocTask

Previously the CheckAPIDocTask was written in a naive way and was
untested.  Using the Rubocop and RSpec Rake tasks as a pattern, the
implementation was improved to allow more configuration flexibility
and testability.  Finally the testing of the task was improved.

[#71229830]
Merge 71229830-test-check_api_doc to master

[Completes #71229830]