Fixed ImapFolder methods to check more than just selected state

Also documented more APIs