Twitter users in two Persian Gulf Arab states have been sentenced to prison, in the latest sign of widening crackdowns on activists, who use social media.