White granular substance from restaurant with interesting properties - what is it?
You kept some of the unknwon as evidence, didn't you?  And a witness, too? Because if you get harmed, document it, and seek both medical as well legal counsel.

Turning to the chemistry: Likely, while dissolving X in water, you felt some heat, too?  Was the colorless solution obtained, when diluted further with additional water and then applied on skin a bit "soap like", felt slippery? 

Vinegar is acidic, because of the acetic acid present.  Hence, mixing / dissolving the unknown proceeds with evolution of heat is indicative for the unknown acting as base that is neutralized. Such reactions generate heat. Similar token with lemon juice, equally reacting acidic, because of the presence of citric acid (even a more acidic than acetic acid): heat evolution possibly because of the neutralization of X (as a base) with it.

An additional indication that X is something basic were the action on diluted neutral juice of red cabbage.  If basic, the addition of X would yield a blue/greenish stain, in contrast to acids turning it red.

Speculation: it could be remaining NaOH.  


Because sodium hydroxide actually (NaOH) is a base, that dissolves with ease in water, it reacts with the emanation of heat while dissolved in acids.  (Even if I am surprised the lemon juice experiment heated up enough to shatter the container.)  Even while preparing a dilute solution of NaOH in water, say 1 M as commonly used in the chem lab, the heat generated is sensible across the glass wall of the container used.
Because sodium hydroxide actually is used as a cleaning agent, to remove oily residues, to remove fat and grease (in other instances, to prepare lye soap) from pans (provided they are not made of aluminum).
Because NaOH is hygroscopic, in other words, the little white grains of it quickly look wet and stick to each other when exposed to humid air.  
Because in pure form, sodium hydroxide is corrosive; and aqueous solutions of it are hazardous, too (pointing to your bleeding sensation).


Thankfully, such accidents in restaurants occure not often; yet there are examples ref1, ref2.  Bars ref3 use caustic soda to rinse their pipes of beer &amp; other beverages, too, connecting the counter with the stock, often out of sight, in the basement.