A man suspected of taking hostages in a post office in the US state of Virginia is in custody, police say.