Multi-region approach to free-boundary three-dimensional tokamak equilibria and resistive wall instabilities