A teacher has appeared in court charged with sexually assaulting and murdering a 13-month-old baby boy whom he was in the process of adopting.