Linear stability analysis of three-dimensional lid-driven cavity flow