Entanglement Entropy of Gapped Phases and Topological Order in Three dimensions