Cats living outdoors is commonly accepted, but as people have pointed out, it's not really good for them. You can't really train or trust them, and even if they left your chickens alone, that's not to say they wouldn't be killing other desirable wildlife like insect-eating songbirds.
Personally, I think terriers are a much better option than a farm/barn cat. They are eager to please and trainable. Some are very stubborn, so it may be hard for you to teach them to stay away from chickens, but at least it's possible. They will kill rodents like rats, mice, chipmunks, squirrels, etc. but won't be plucking wild birds out of the air or climbing trees and knocking babies out of the nest. Plus I think a dog would attach itself more to you, and therefore be lest prone to wandering.
I've never owned a terrier or outdoor cat myself, this is all based on what I've read and what people have told me, and also what I know about dogs and cats in general. You really can't train cats. You can deter them from doing certain things, but you can't train them. Even litter boxes- humans don't train them to bury their waste. Cats do it on their own because they like to. Same thing with everything else.
In my opinion you should consider a small farm dog. You say you have a problem with stray cats. Well another cat may just attract them more and they will get into territorial spats. It may get injured or infected with FIV or another disease. On the other hand, a small, spunky dog would be more than happy to run them off for you. Cats will stand and fight with other cats, but when it comes to dogs (especially dogs they don't know) they almost always run.