Multipartite entanglement and hyperdeterminants