A lightly regarded Portuguese political party finds itself in a position to play kingmaker in the wake of national elections that failed to propel either of the two establishment parties into power.