Add unit tests for the register_widget() check.
Use regex to reduce false positives in the check for register_widget().

This matches the earlier check for register_sidebar(), but a regex match
might be more robust. It prevents a false positive for functions that
use the 'register_widget' slug in their name, for instance,
'prefix_register_widget_areas'.