Average price of detached home in Toronto nears $1M