Add texture slots in blender 2.8 special cases
Here are some rough replacements for the functions you posted:
import bpy
from bpy_extras.image_utils import load_image
from bpy_extras.node_shader_utils import PrincipledBSDFWrapper

# Sets a base color map to be used by the material.
def set_base_color_map_filename(mat, filename):
    ma_wrap = PrincipledBSDFWrapper(mat, is_readonly=False)
    image = load_image(filename)
    if ma_wrap.base_color_texture:
        ma_wrap.base_color_texture.image = image

# Returns base color of the material.
def get_base_color(mat):
    ma_wrap = PrincipledBSDFWrapper(mat)
    return ma_wrap.base_color

# Sets base color of the material.
def set_base_color(mat, clr):
    ma_wrap = PrincipledBSDFWrapper(mat, is_readonly=False)
    ma_wrap.base_color = clr

# Finds a base color image for the material.
def find_base_color_image(mat):
    ma_wrap = PrincipledBSDFWrapper(mat)
    if ma_wrap.base_color_texture:
        return ma_wrap.base_color_texture.image

# Finds a material which uses the specified image; if not found, the function creates a new material
# So this function never fails.
def get_material_by_image(image):
    for mat in bpy.data.materials:
        ma_wrap = PrincipledBSDFWrapper(mat)
        if ma_wrap.base_color_texture:
            if ma_wrap.base_color_texture.image == image:
                return mat

    mat = bpy.data.materials.new(image.name)
    ma_wrap = PrincipledBSDFWrapper(mat, is_readonly=False)
    ma_wrap.base_color_texture.image = image
    return mat