Fix for #19918 : select_for_update runs on db_for_read rather than db_for_write

* fixed #19918 by setting the _for_write attribute on QuerySets returned by select_for_update
* added a test for this; the test uses the TestRouter from regressiontests.multiple_database.tests