Electric multipole moments and higher-order topological phases in crystalline insulators and superconductors