On the expressive power of permanents and perfect matchings of matrices of bounded pathwidth/cliquewidth