Scottish government doubles funding for affordable housing