Why do we divide the kernel estimate function by h and also the entire equation by h? I believe the explanation is that the kernel estimate function would integrate to 1. But I do not quite understand the intuition behind it. How would dividing by h help to make the function integrate to 1. Also, what is the output of the kernel  k(.) if it were Uniform. EXPLANATION
 A: 
How would dividing by h help to make the function integrate to 1. 

Like this:
$$\begin{align}
&\int_{-\infty}^\infty\hat{f_h}(x)dx\\
&=\int_{-\infty}^\infty \frac{1}{n}\sum_1^n\frac{1}{h}K\left(\frac{x-x_i}{h}\right) dx\\
&=\frac{1}{n}\frac{1}{h}\sum_1^n\int_{-\infty}^\infty K\left(\frac{x-x_i}{h}\right) dx\\
&=\frac{1}{n}\frac{1}{h}\sum_1^n\int_{-\infty}^\infty K\left(\frac{x-x_i}{h}\right)h\,d\left(\frac{x-x_i}{h}\right)\\
&=\frac{1}{n}\sum_1^n\int_{-\infty}^\infty K\left(\frac{x-x_i}{h}\right)\,d\left(\frac{x-x_i}{h}\right)\\
&=\frac{1}{n}\sum_1^n1\\
&=1
\end{align}
$$
where we've used the fact that $K$ is a probability density function, i.e. 
$$\int_{-\infty}^\infty K(t)dt = 1.
$$ 

what is the output of the kernel k(.) if it were Uniform

If uniform on interval $(-a,a)$, then the kernel is
$$K(t) = \frac{1}{2a}[-a<t<a]
$$
and
$$\begin{align}
\hat{f_h}(x)&=\frac{1}{n}\sum_1^n\frac{1}{h}K\left(\frac{x-x_i}{h}\right)\\
&=\frac{1}{n}\frac{1}{h}\frac{1}{2a}\sum_1^n\left[-a<\frac{x-x_i}{h}<a\right]\\
&=\frac{1}{2ah}\left(\frac{1}{n}\sum_1^n\left[x-ah<x_i<x+ah\right]\right)\\
&=\frac{1}{2ah}\hat{P}(x-ah<X<x+ah)
\end{align}$$
where $\hat{P}(.)$ is an estimate of the probability of the "small" interval  $(x-ah,x+ah)$ of width $2ah$.
NB:  Note how this gives
$$\hat{f_h}(x)\,2ah\approx P(x-ah<X<x+ah)
$$
compared to the actual density function $f(x)$, which has the property that for "small" $dx$, $$f(x)\,dx\approx P\left(x-\frac{dx}{2}<X<x+\frac{dx}{2}\right).$$
