exercise 4: join cost estimation

passes joinOptimizerTest except for the orderJoinTest`s