Add a wfWaitForSlaves() call at the end of sql.php

Useful if you're doing queries over many wikis (wmf usage) that might
induce some repllag

Change-Id: I9818f1763d3330d0b96d9bb9c192a957293b6a5b