MPs will have to move out of the Houses of Parliament for at least six years as part of a restoration project.