A mentally ill man who killed three people during a night-time rampage in Nottingham has been given an indefinite hospital order.