A controversial student accommodation scheme on the site of a Southampton shopping centre has been approved by the narrowest of margins at a council meeting.