Begin stmt.putData() work

Fix ParamDataOperation::parameter_ not being initialised
Move some buffer code into buffer.cpp