Uganda was on edge as polls opened on Thursday, with President Yoweri Museveni expected to extend his 40-year rule amid an internet shutdown and a police crackdown on the opposition.