Massachusetts is planning to phase out a program housing homeless families in hotels and motels when emergency shelters are full. It is slated to end by June 2014.