implemented basic backward chaining inference step that matches
  goals against facts (without backtracking for now)
added variable substitution to patterns
implemented backtracking for backward chaining inference (using only facts)