Parenthood, break-ups, friendship, weird crushes… they’re all played out hilariously in Sharon Horgan’s mega-hit series Motherland. So is it inspired by her own life as a solo mum? Absolutely everything happens at the school gates, she tells Cole Moreton