The child and his mother had been held hostage by the mother’s ex-boyfriend for several hours before the police standoff began