Non-LTE line-formation for neutral and singly-ionized carbon - Model atom and first results on BA-type stars