Yemeni political parties have signed a document pledging a "just solution" that would grant some autonomy to the south in the face of secessionist demands.