The 26.3-h orbit and multiwavelength properties of the ‘redback’ millisecond pulsar PSR J1306–40