For five years, a New York City man managed to live rent-free in a landmark Manhattan hotel by exploiting an obscure local housing law.