Hungarian soldiers began erecting a controversial fence on the border with Serbia which is aimed at keeping out migrants.