Measurement of the complete spin density matrix of the Y∗ (1385) in 8 GeV/cπ+p and 10 GeV/c K−p interactions and comparison with quark model predictions