Dimension and measure in finite first order structures — doctoral thesis