refactored importing redis lua dependencies (cjson etc.) to a separate function

bug:SS-1745