Thousands of refugees are stranded in Greece after other European countries imposed a cap on arrivals.