Facebook on Tuesday committed $1 billion to tackle affordable housing shortages in the Bay Area and around the country — a surprise move that lands the social media company among the handful of corporate giants offering massive amounts of cash to ease the crisis wracking California.