It could be any of the possiblities you mention but that's also a classic sign of impacted anal glands. If the diarrhoea smelled really bad (or not) "shooting" the anal glands is also a symptom. ...