Fix test errors

- Implementing interface of AFSecurityPolicy's private method
- Fixing failing test. `PinningMode` is None, then `policy.validatesDomainName` is NO

I want to pass test by travis.