Cooking television show America’s Test Kitchen has agreed to purchase recipe site Food52, which said it was forced to file bankruptcy after its lender unexpectedly swept cash from its bank accounts.