Michelle Obama has urged young people to work hard and get a good education, in her final speech as US First Lady.