Maximal gauged supergravity in three dimensions