Foolproof security to be ensured during by-elections: Police