removed dead code ($success), changed the connection state detection.

dead code $success removed. i recommend another way to detect a working connection:

getServerVersion() calls getAttribute(PDO::ATTR_SERVER_VERSION). getAttribute() calls setActive(true) first. i gusss its better to call setActive directly and use getActives return value.