UBS’ fourth-quarter profit beat market expectations, but the Swiss banking giant warned of an “uncertain” year ahead.