Modelling multiple term structures of defaultable bonds with common and idiosyncratic state variables