Added function to retrieve last insert ID from CommonDBModel derivatives.