Uganda's long-time president has been sworn-in for a controversial fifth term amid opposition arrests.