Further shorten code concerning MySQL operations

Move the check for at least n (usually 1) results from
a SELECT query to the Assert::dbMinRows() method. This
shortens and simplifies a lot of code.
Also use Assert class for non-SELECT operations

Enable Assert::dbMinRows() to accept a mysqli instance after
an operation such as INSERT, UPDATE or DELETE. In this case,
the affected_rows property is checked, not num_rows as after
SELECT operations when a mysqli_result instance is passed.