Presolveing in conic programming: theory and implementation