(#5388) PDOStatement.rowCount() doesn't meet DELETE, INSERT, or UPDATE statements specification

According to the specification of PDOStatement.rowCount() from http://php.net/manual/en/pdostatement.rowcount.php,
it must return "the number of rows affected by the last DELETE, INSERT, or UPDATE statement".
"... SELECT statement, some databases may return the number of rows returned by that statement. However, this behaviour is not guaranteed"
However the current implementation of rowCount() was only returning the number of rows returned by SELECT statement.
By this commit the implementation has changed to return the number of rows affected by DELETE, INSERT, or UPDATE statements and also the number of rows returned by the SELECT statement

Example:
$sql = "UPDATE `character` SET `xp` = `xp` + 5 WHERE `xp` = 0 AND `character_id` = :id";

$st = PDO::prepare($sql);

$st->bindValue(':id', $id);
$st->execute();
$affectedRowsCount = $st->rowCount();

// Because of this issue, the $affectedRowsCount is always == 0
if ($affectedRowsCount == 0)
{
  echo "No characters found who need XP";
}