Layout specification and discovery should follow the same behavior as partials

Fixes #1047
nit: since `viewName` may be a relative path and `RazorPageResult` describes its first parameter just as "name", may be more correct to pass `Path.GetFileName(viewName)` and `searchedLocations.Select(location => Path.Combine(location, Path.GetDirectoryName(viewName)`