General hidden-variable model for a two-qubit system