Thousands were left homeless after they were evicted from a poor neighbourhood of the Chinese capital.