I think you started with some wrong definitions.
The right definition for stabilizability and detectability should be:
A system is stabilizable if the uncontrollable states are stable.
A system is detectable if the unobservable states are asymptotically stable.
You seemed to be using the definition the other way around.
So with these definitions, the task should be very straightforward.
For stabilizability, you simply decompose the system into controllable and uncontrollable subsystems, and then check if the uncontrollable subsystem is stable.
For detectability, again, decompose the system into observable and unobservable subsystems, then check if the unobservable subsystem is asymptotically stable.
The easiest way of finding the minimal state space model I think would be using the Kalman decomposition. This allows you to find a similarity transformation that makes it easy to split the state space model into a minimal (controllable and observable) and non-minimal (not controllable or not observable) form.
When calculating this decomposition you could use the Hautus test, but you could also use the controllability and observability matrix. I made a quick implementation of both in MATLAB, whose code can be seen below.
Hautus test:
function [M, Ak, Bk, Ck, N] = kalman_decomp_hautus(A, B, C)
[V,D] = eig(A);
n = length(A);
M1 = []; M2 = []; M3 = []; M4 = [];
N = zeros(1, 4);
for k = 1 : n
tempC = rank([A - D(k,k) * eye(n) B]) - n;
tempO = rank([A - D(k,k) * eye(n); C]) - n;
if tempC == 0
if tempO == 0
M2 = [M2 V(:,k)];
N(2) = N(2) + 1;
else
M1 = [M1 V(:,k)];
N(1) = N(1) + 1;
end
else
if tempO == 0
M4 = [M4 V(:,k)];
N(4) = N(4) + 1;
else
M3 = [M3 V(:,k)];
N(3) = N(3) + 1;
end
end
end
M = [M1 M2 M3 M4];
Ak = M \ A * M;
Bk = M \ B;
Ck = C * M;
Using this implementation does have the downside that the decomposed state space model matrices can have complex numbers, because if the original $A$ matrix (assuming it is real valued) has complex conjugate eigenvalues then its eigenvectors will be complex conjugate as well, and therefore the similarity transformation also. You could of course try to detect this, but I just wanted a working example.
Controllability and observability matrix:
function [M, Ak, Bk, Ck, N] = kalman_decomp_matrix(A, B, C, tol)
cc = ctrb(A, B);
oo = obsv(A, C);
Sc = rref(cc')'; Sc = Sc(:,1:rank(cc));
Nc = null(cc');
So = rref(oo)'; So = So(:,1:rank(oo));
No = null(oo);
M1 = rref(round(Sc * (Sc \ No),tol)')';
N(1) = rank(M1);
M1 = M1(:,1:N(1));
M2 = rref(round(Sc * (Sc \ So),tol)')';
N(2) = rank(M2);
M2 = M2(:,1:N(2));
M3 = rref(round(Nc * (Nc \ No),tol)')';
N(3) = rank(M3);
M3 = M3(:,1:N(3));
M4 = rref(round(Nc * (Nc \ So),tol)')';
N(4) = rank(M4);
M4 = M4(:,1:N(4));
M = [M1 M2 M3 M4];
Ak = M \ A * M;
Bk = M \ B;
Ck = C * M;
I have not done many tests, but with one test I noticed that finding the intersect of two spans of vectors could give wrong results due to limited numerical accuracy, so I added rounding (using tol=13 seems to omit errors in my case).
Once you have your Kalman decomposition then the minimal realisation of the state space model can be constructed using:
list = N(1) + 1:N(1) + N(2);
Am = Ak(list,list);
Bm = Bk(list,:);
Cm = Ck(:,list);
Dm = D;
If you just want to minimal realisation then you might be able to calculate it faster. But you do need to ensure that the total $M$ matrix is square and full rank.
Best Answer
The controllability of a LTI state space model does not change under state feedback. This can be shown by using the Hautus test to check for controllability
$$ \begin{bmatrix} \lambda\,I - A + B\,K & B \end{bmatrix} = \begin{bmatrix} \lambda\,I - A & B \end{bmatrix} \begin{bmatrix} I & 0 \\ K & I \end{bmatrix}, $$
since the right most matrix is square and full rank and thus the rank of the remaining matrices have to be equal to each other. So just by looking at the transfer function and noticing that there is a pole-zero cancelation one could already conclude that it would not be observable (using the Hautus test for observability one can conclude it would lose one rank).
It can also be noted that all state space models (of the same size), that have the same corresponding transfer function, are equivalent to each other. So the results regarding controllability and observability of your model should also hold for other equivalent state space realizations. So your choice for $A$ and $B$ would allow you to say something about it (assuming one has to use a minimal realization).
I do have a remark regarding the last part of the question, regarding controllability and observability. Namely, one can always start with a non-minimal state space realization, which is not controllable and not observable. Such system will always remain that way.