Fix addon voting through api

There is no good way to tell if you insert or update a row using the
rowCount pdo operation. If your vote didn't change, this would return 0
and thus throw an exception. Any other case should return 1, assuming
the database primary key is correctly set.