test($compile): add test for optional `require` in directives with `^` operator

The directive property `require` allows optional requirement via
the `?` before or after the `^` operator. Add tests to ensure this
functionality is not lost inadvertently.

Closes #9391
Closes #9392
fix($compile): returning null when an optional controller is not found

Currently, `undefined` is returned. However, the desired behavior is to
return `null` when the controller is optional and not found.

(If this breaks your app, it really shouldn't .v.)

Closes #9404
Closes #9392