Agency gets state funding to build homeless shelter in Bayview