Solution of all quartic matrix models