added a method to determine if resource port is optional (80 or 443)
use resource::hasOptionalPort
fix resource::hasPort method
missed a case in resource::hasOptionalPort + added UT
added a pass to retrieve all relevant links in the page