Fix `Formula#check_conflicts` to detect conflicted but older than latest formula

# Problem

`Formula#check_conflicts` only check that **the latest version** of the formula is installed.

This implementation causes that Homebrew can't detect that the conflict with the formula older than latest.

## How to reproduce the problem

```sh
cd $(brew --prefix)
git checkout dc2ddb92 -- Library/Formula/mysql.rb # checkout older version of MySQL
brew install mysql
ls $(brew --cellar)/mysql # => 5.6.20/
brew install mariadb # fail, because mariadb conflicts with mysql (expected)

git reset --hard HEAD # checkout the latest version of MySQL formula (newer than the cellar)

brew install mariadb # mariadb conflicts with mysql, but Homebrew installs mariadb (NOT expected)
```

# Solve

Check the existence of `opt_prefix` that the reference of any current active installation of the formula.