With a historic shortage of homes for sale, investors making cash offers are pushing first-time homebuyers out of the market.