Identifying restrictions of linear equations with applications to simultaneous equations and cointegration