Long-standing mystery solved after pregnant megamouth shark washes up on beach