Three-dimensional alterfold theory and quantum invariants