On the stability of three-dimensional boundary layers with application to the flow due to a rotating disk